Commit Graph

8646 Commits

Author SHA1 Message Date
David Smiley 4cb3ad4a1c
* SOLR-14923: Nested docs indexing perf & robustness (#2159)
* When the schema defines _root_, and you want to do atomic/partial updates...
** _root_ needn't be stored or have docValues any more
** _nest_path_ field isn't needed for this any more
** Simplified internal logic
* Allow (and recommend, eventually insist) that the _root_ field be passed for atomic/partial updates to child docs.
** In the absence of _root_, assume the _route_ param is equivalent to ameliorate back-compat scope.  This is a temporary hack; remove in SOLR-15064.
** One of the two is required; you'll get an exception if the assumption is false.  THIS IS A BACK-COMPAT CHANGE
* Ensure that the update log contains the _root_ field if it's defined in the schema; in some cases it wasn't.  It's important for robustness of atomic/partial updates to child docs.  Caveat: the buffer replay scenario is not tested with child docs.
* Limited the cases when a realtime searcher is re-opened.  It was being applied to any update that included child docs but now only some narrow subset: only for atomic/partial updates, and when the update log contains an in-place update for the same nest because it's complicated to resolve those log entries.
* Internal improvements to RealTimeGetComponent to aid clarity & robustness & probably performance...
** Use SolrDocumentFetcher.solrDoc(docID, ReturnFields) instead of more manual loading.  Will do more with this in another PR.
** Clarify when only root doc IDs are expected.
** Use Resolution enum more, add PARTIAL, remove DOC_WITH_CHILDREN; enhance docs.
** When have ReturnFields, a Set of "onlyTheseFields" becomes redundant.  Add a child doc resolution via a transformer when needed.
** Clarified where copy-field targets are removed
* NestPathField should default to single valued, instead of inheriting the schema default, which for ancient schemas was multi-valued.
* AddUpdateCommand.getLuceneDocument(s) methods are very internal; made package visible and refactored a bit for clarity
* DocumentBuilder: when in-place update, skip id and _root_ here, thus also simplifying further logic
* NestedShardedAtomicUpdateTest no longer extends AbstractFullDistribZkTestBase because it wasn't really leveraging the "control client" checking, and it added too much complexity to debug failures.
2021-01-07 23:23:20 -05:00
Christine Poerschke 60f2417aca
SOLR-15057: avoid unnecessary object retention in FacetRangeProcessor (#2160) 2021-01-07 18:45:46 +00:00
Munendra S N 6ff4a9b395 SOLR-14514: add extra checks for picking 'stream' method in JSON facet
missing, allBuckets, and numBuckets is not supported with stream method.
So, avoiding picking stream method when any one of them is enabled even if
facet sort is 'index asc'
2021-01-07 22:01:27 +05:30
Munendra S N d7fd3d8c20 SOLR-12539: handle extra spaces in JSON facet shorthand syntax 2021-01-07 22:01:27 +05:30
Munendra S N 0846da5c22 SOLR-14950: fix regenerating of copyfield with explicit src/dest matching dyn rule
CopyFields are regenerated in case of replace-field or replace-field-type.
While regenerating, source and destionation are checked against fields but source/dest
could match dynamic rule too.
For example,
<copyField source="something_s" dest="spellcheck"/>
<dynamicField name="*_s" type="string"/>
here, something_s is not present in schema but matches the dynamic rule.

To handle the above case, need to check dynamicFieldCache too while regenerating the
copyFields
2021-01-07 22:01:27 +05:30
S N Munendra d4fa1aae21
SOLR-10860: Return proper error code for bad input incase of inplace updates (#2121)
Return proper error code on invalid value with in-place update.
Handle invalid value for inc op with the in-place update, uses toNativeType to convert increment value instead of direct parsing. Also, return an error when inc operation is specified for the non-numeric field
2021-01-07 20:44:48 +05:30
David Smiley 3147625890
SOLR-15069: [child parentFilter=...] is now optional (#2181) 2021-01-06 17:43:15 -05:00
Chris Hostetter 07071ca8e1 SOLR-15047: Fix collapse parser behavior when collapsing on numeric fields to differentiate '0' group from null group 2021-01-06 10:07:32 -07:00
Timothy Potter 2fcaba1ce2
SOLR-15058: Enforce node_name contains colon and port and find first underscore after colon to parse context (#2178) 2021-01-05 12:00:14 -07:00
Chris Hostetter a48e937f59 SOLR-15048: Fixed collapse parser behavior when dealing with docs boosted by QueryElevationComponent that are in the null group to treat them consistently regardless of collapse field type or group head selector 2021-01-05 10:00:56 -07:00
Bruno Roustant 5e21e3f380
SOLR-15061: Fix NPE in SearchHandler when shards.info and no QueryComponent configured 2021-01-05 15:15:48 +01:00
Andrzej Bialecki 2695624a9f SOLR-15019: Replica placement API needs a way to fetch existing replica metrics. 2021-01-04 15:24:25 +01:00
Noble Paul 3056296fa2
SOLR-15062: /api/cluster/zk/ls should give the stat of the current node (#2172) 2021-01-04 14:08:14 +11:00
Tim Dillon 17adcc7aa4
SOLR-14034: remove deprecated min_rf references (#2152) 2020-12-31 15:59:48 +00:00
Dawid Weiss 8ef6a0da56 LUCENE-9570: code reformatting [partial]. 2020-12-28 12:26:13 +01:00
John Gallagher 70f461ee45
SOLR-14413 allow timeAllowed and cursorMark parameters
closes #1436
2020-12-23 13:01:44 -06:00
Pieter van Boxtel 98f12f4aeb
SOLR-15031 Prevent null being wrapped in a QueryValueSource
closes #2118
2020-12-22 15:34:18 -06:00
Jason Gerlowski 8b272a0960
SOLR-15049: Add TopLevelJoinQuery optimization for 'self-joins' (#2146) 2020-12-22 08:32:52 -05:00
Timothy Potter 809d15115b
SOLR-15054: Test should not require private methods to be final (#2150) 2020-12-16 15:35:30 -07:00
Christine Poerschke 0b5003cfed
SOLR-14939: JSON range faceting to support cache=false parameter (#1992) 2020-12-16 17:42:24 +00:00
Mike Drob bf7b438f12
SOLR-15029 Trigger leader election on index writer tragedy
SOLR-13027 Use TestInjection so that we always have a Tragic Event

When we encounter a tragic error in the index writer, we can trigger a
leader election instead of queing up a delete and re-add of the node in
question. This should result in a more graceful transition, and the
previous leader will eventually be put into recovery by a new leader.

closes #2120
2020-12-15 15:54:40 -06:00
Noble Paul 94c69f4385
SOLR-14977: improved plugin configuration (#2099) 2020-12-15 14:18:09 +11:00
noblepaul 63943a739b use RTimer 2020-12-14 19:03:31 +11:00
noblepaul a2a811a1b4 added a perf test 2020-12-14 18:54:32 +11:00
Noble Paul a95ce0d422
SOLR-14827: Refactor schema loading to not use XPath (#1963) 2020-12-11 15:27:47 +11:00
Joel Bernstein 04b9a98060 SOLR-15040: Improvements to postlogs timestamp handling 2020-12-10 12:49:42 -05:00
Andrzej Bialecki 8dcaa6c6d3 SOLR-15022: Add RefGuide documentation for cluster plugins. 2020-12-07 14:03:47 +01:00
Tim Owen 510f96c69c
SOLR-8673: Enable custom aggregate functions by opening up FacetContext
Prior to this change, it was not feasible to write a custom aggregate function in plugin code
because the FacetContext class did not expose its fields for access outside its package. Also
some of the useful abstract classes for SlotAcc were package-private too
2020-12-06 22:45:09 -08:00
Andrzej Bialecki 478c6cb0f5 SOLR-15016: Fix javadoc so that the example matches the current API. 2020-12-06 18:45:01 +01:00
Andrzej Bialecki cced5078ea SOLR-15016: Replica placement plugins should use container plugins API / configs. 2020-12-06 14:51:10 +01:00
saatchibhalla 19ed903377
SOLR-14965: add overseer queue size metrics (#2040)
Adds two metrics to the SolrCloud Overseer: solr_metrics_overseer_stateUpdateQueueSize and solr_metrics_overseer_collectionWorkQueueSize with corresponding entries in the the Prometheus exporter's default/stock configuration.

Co-authored-by: Saatchi Bhalla <s.bhalla@salesforce.com>
2020-12-04 16:47:35 -05:00
Mike Drob cef928171f
SOLR-14992 Wait for node down before checking for node up (#2115) 2020-12-03 16:32:07 -08:00
Chris Hostetter 5208d47e1a SOLR-14934: Remove redundent deprecated "solr.solr.home" logic 2020-12-02 17:18:58 -07:00
Chris Hostetter 2e6a02394e SOLR-14934: Refactored duplicate "Solr Home" logic into a single place to eliminate risk of tests using divergent values for a single solr node. 2020-12-02 10:24:36 -07:00
Shalin Shekhar Mangar d99c1667a5
SOLR-14942: Move request registration to ContentStreamHandlerBase (#2112)
This addresses review feedback from David Smiley on Jira. It moves the request registration to the ContentStreamHandlerBase class instead of doing a hack-ish instanceof check inside HttpSolrCall.
2020-12-02 10:11:23 +05:30
Thomas Mortagne feb897a962
SOLR-15017: Core's lib/ dir was ignored sometimes (#2107)
A core's lib/ folder was ignored when the core's configuration did not define any <lib> element.  This is a regression introduced in 8.6 by SOLR-14197.
2020-12-01 15:40:21 -05:00
Ilan Ginzburg 3df72502cc
SOLR-15004: tests for the replica placement API + placement plugin fixes and light refactoring (#2110)
Co-authored-by: Andrzej Bialecki <ab@apache.org>
2020-12-01 20:07:08 +01:00
Simon Willnauer 663655d659 SOLR-15013: Prevent merges since test asserts doc order 2020-12-01 10:23:12 +01:00
Timothy Potter a0492840ee
SOLR-12182: Don't persist base_url in ZK as the scheme is variable, compute from node_name instead (#2010) 2020-11-30 12:05:48 -07:00
Mike Drob cb5ba42bd7
SOLR-15009 Propogate IOException from DF.exists 2020-11-30 10:27:23 -08:00
Chris Hostetter 37a61635e1 SOLR-14958: Refactor zkHost config logic to make testing easier and reduce risk of incorrect value being used 2020-11-30 10:43:08 -07:00
Marcus b9a93cf695
LUCENE-8626: Standardize Lucene test file naming Part 2 (#2053) 2020-11-17 08:13:13 -05:00
Nazerke Seidan 2d583eaba7
SOLR-14998: logging: info->debug in CollectionsHandler (#2079)
Because it's almost always redundant with HttpSolrCall's admin request log.
Co-authored-by: Nazerke Seidan <nseidan@salesforce.com>
2020-11-16 16:59:31 -05:00
Noble Paul 73d5e7ae77
SOLR-14977 : ContainerPlugins should be configurable (#2065) 2020-11-17 00:19:50 +11:00
Adrien Grand 06877b2c6e
LUCENE-9378: Make it possible to configure how to trade speed for compression on doc values. (#2069)
This adds a switch to `Lucene80DocValuesFormat` which allows to
configure whether to prioritize retrieval speed over compression ratio
or the other way around. When prioritizing retrieval speed, binary doc
values are written using the exact same format as before more aggressive
compression got introduced.
2020-11-12 16:10:00 +01:00
Christine Poerschke 2f02040a4c SOLR-14983: Fix response returning original score instead of reranked score due to query and filter combining.
(Krishan Goyal, Jason Baik, Christine Poerschke)
2020-11-12 12:51:21 +00:00
Jason Gerlowski a7197ac0ce
SOLR-14971: Handle atomic-removes on uncommitted docs (#2056)
Docs fetched from the update log via RTG look different than docs
fetched from commits in the index: the types of
field-values may be different between the two, etc.

This is a problem for atomic add/remove of field values, where matching
existing values has historically been done by object equals() calls (via
Collection operations).  This relies on equality checks which don't have
flexible enough semantics to match values across these different types.
(For example, `new Long(1).equals(new Integer(1))` returns `false`).
This was causing some add-distinct and remove operations on
uncommitted values to silently fail to remove field values.

This commit patches over this by converting between types in the more
common cases before using the fallback behavior.
2020-11-11 12:28:11 -05:00
Bruno Roustant 67f9245ce3
SOLR-14975: Optimize CoreContainer.getAllCoreNames and getLoadedCoreNames.
Also optimize getCoreDescriptors.
2020-11-11 11:37:45 +01:00
Andrzej Bialecki 863a388fe7 SOLR-14683: Move the CHANGES.txt entry to the right place. Fix wrong type of null value. 2020-11-10 17:58:45 +01:00
Tomoko Uchida d1110394e9
LUCENE-9600: Clean up package name conflicts between misc and core modules (#2064) 2020-11-10 22:24:48 +09:00