SEARCH-252 [SOLR6] Highlight doesn't work as expected when searching by a string containing numbers and letters

- fix highlighting to use the second phase query parser.
This commit is contained in:
ahind
2016-12-06 22:01:08 +00:00
parent 553911886e
commit 511aa63bef
3 changed files with 52 additions and 18 deletions
@@ -1848,7 +1848,8 @@
<str name="rq">{!alfrescoReRank reRankQuery=$rqq reRankDocs=500 scale=true reRankWeight=3}</str>
<str name="rqq">{!rrafts}RERANK_QUERY_FROM_CONTEXT</str>
<str name="hl.qparser">rrafts</str>
</lst>
<arr name="components">
<str>setLocale</str>
@@ -649,7 +649,17 @@
-->
<!-- QuerySenderListener takes an array of NamedList and executes a
local query request for each NamedList in sequence.
-->
<listener event="newSearcher" class="solr.QuerySenderListener">
<arr name="queries">
<!--
<lst><str name="q">solr</str><str name="sort">price asc</str></lst>
<lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
-->
</arr>
</listener>
<listener event="firstSearcher" class="org.alfresco.solr.lifecycle.SolrCoreLoadListener" />
<!-- Use Cold Searcher
@@ -825,6 +835,7 @@
<arr name="components">
<str>setLocale</str>
<str>rewriteFacetParameters</str>
<str>consistencyComponent</str>
<str>query</str>
<str>facet</str>
<str>mlt</str>
@@ -835,6 +846,7 @@
<str>rewriteFacetCounts</str>
<!-- <str>addTxId</str> -->
<str>spellcheck</str>
<str>spellcheckbackcompat</str>
<str>setProcessedDenies</str>
</arr>
</requestHandler>
@@ -854,6 +866,7 @@
<arr name="components">
<str>setLocale</str>
<str>rewriteFacetParameters</str>
<str>consistencyComponent</str>
<str>query</str>
<str>facet</str>
<str>mlt</str>
@@ -1204,7 +1217,7 @@
always be executed after the "last-components"
-->
<!-- Spell Check
The spell check component can return a list of alternative spelling
@@ -1256,20 +1269,23 @@
</lst>
</searchComponent>
<!-- A request handler for demonstrating the spellcheck component.
NOTE: This is purely as an example. The whole purpose of the
SpellCheckComponent is to hook it into the request handler that
handles your normal user queries so that a separate request is
not needed to get suggestions.
<searchComponent name="spellcheckbackcompat" class="org.alfresco.solr.component.spellcheck.AlfrescoSpellCheckBackCompatComponent"/>
IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
See http://wiki.apache.org/solr/SpellCheckComponent for details
on the request parameters.
-->
<!-- A request handler for demonstrating the spellcheck component.
NOTE: This is purely as an example. The whole purpose of the
SpellCheckComponent is to hook it into the request handler that
handles your normal user queries so that a separate request is
not needed to get suggestions.
IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
See http://wiki.apache.org/solr/SpellCheckComponent for details
on the request parameters.
-->
<requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
<lst name="defaults">
<str name="df">suggest</str>
@@ -1291,6 +1307,8 @@
</lst>
<arr name="last-components">
<str>spellcheck</str>
<str>spellcheckbackcompat</str>
</arr>
</requestHandler>
@@ -1786,6 +1804,7 @@
<arr name="components">
<str>setLocale</str>
<str>rewriteFacetParameters</str>
<str>consistencyComponent</str>
<str>query</str>
<str>facet</str>
<str>mlt</str>
@@ -1802,6 +1821,12 @@
</requestHandler>
<requestHandler name="/fingerprint" class="org.apache.solr.handler.component.AlfrescoSearchHandler" lazy="true" >
<arr name="components">
<str>fingerprint</str>
</arr>
</requestHandler>
<requestHandler name="/afts" class="org.apache.solr.handler.component.AlfrescoSearchHandler" lazy="true" >
<lst name="defaults">
<str name="defType">afts</str>
@@ -1824,11 +1849,13 @@
<str name="rq">{!alfrescoReRank reRankQuery=$rqq reRankDocs=500 scale=true reRankWeight=3}</str>
<str name="rqq">{!rrafts}RERANK_QUERY_FROM_CONTEXT</str>
<str name="hl.qparser">rrafts</str>
</lst>
<arr name="components">
<str>setLocale</str>
<str>rewriteFacetParameters</str>
<str>consistencyComponent</str>
<str>query</str>
<str>facet</str>
<str>mlt</str>
@@ -1839,6 +1866,7 @@
<str>rewriteFacetCounts</str>
<!-- <str>addTxId</str> -->
<str>spellcheck</str>
<str>spellcheckbackcompat</str>
<str>setProcessedDenies</str>
<str>clustering</str>
@@ -1854,6 +1882,7 @@
<arr name="components">
<str>setLocale</str>
<str>rewriteFacetParameters</str>
<str>consistencyComponent</str>
<str>query</str>
<str>facet</str>
<str>mlt</str>
@@ -1894,7 +1923,8 @@
<searchComponent name="rewriteFacetParameters" class="org.alfresco.solr.component.RewriteFacetParametersComponent" />
<searchComponent name="rewriteFacetCounts" class="org.alfresco.solr.component.RewriteFacetCountsComponent" />
<searchComponent name="setProcessedDenies" class="org.alfresco.solr.component.SetProcessedDeniesComponent" />
<searchComponent name="consistencyComponent" class="org.alfresco.solr.component.ConsistencyComponent" />
<searchComponent name="fingerprint" class="org.alfresco.solr.component.FingerPrintComponent"/>
<searchComponent name="log" class="org.alfresco.solr.component.QueryLoggingComponent" />
</config>
@@ -60,6 +60,9 @@ alfresco.threadPriority=5
alfresco.threadDaemon=true
alfresco.workQueueSize=-1
alfresco.commitInterval=60000
alfresco.newSearcherInterval=120000
# HTTP Client
alfresco.maxTotalConnections=200
@@ -100,7 +103,7 @@ alfresco.transactionDocsBatchSize=500
alfresco.nodeBatchSize=100
alfresco.changeSetAclsBatchSize=500
alfresco.aclBatchSize=100
alfresco.contentReadBatchSize=1000
alfresco.contentReadBatchSize=100
alfresco.contentUpdateBatchSize=1000
# Warming