[jira] [Commented] (SOLR-13367) Highlighting fails for Range queries on Multi-valued String fields

2019-06-24 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-13367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16871979#comment-16871979
 ] 

ASF subversion and git services commented on SOLR-13367:


Commit 5259e964b5665d726ccd1391925057a1cab39ef2 in lucene-solr's branch 
refs/heads/branch_8x from David Wayne Smiley
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=5259e96 ]

SOLR-13367: Range queries will now highlight in hl.method=unified mode.
Lucene MatchesUtils.disjunction method for disjunction over
 BytesRefIterator terms.


> Highlighting fails for Range queries on Multi-valued String fields
> --
>
> Key: SOLR-13367
> URL: https://issues.apache.org/jira/browse/SOLR-13367
> Project: Solr
>  Issue Type: Bug
>  Components: highlighter
>Affects Versions: 7.5, 7.7.1
> Environment: RedHat Linux v7
> Java 1.8.0_201
>Reporter: Karl Wolf
>Assignee: David Smiley
>Priority: Major
> Attachments: SOLR-13367.patch, SOLR-13367.patch, SOLR-13367.patch
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Range queries against multi-valued string fields produces useless 
> highlighting, even though "hl.highlightMultiTerm":"true"
> I have uncovered what I believe is a bug. At the very lease it is a 
> difference in behavior between Solr v5.1.0 and v7.5.0 (and v7.7.1).
> I have a multi-valued string Field defined in my schema as:
>  
>   multiValued="true" />
> I am using a query containing a Range clause and I am using highlighting to 
> get the list of values that actually matched the range query.
> All examples below were using the appropriate Solr Admin Server SolrCore 
> Query page.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-13367) Highlighting fails for Range queries on Multi-valued String fields

2019-06-24 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-13367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16871978#comment-16871978
 ] 

ASF subversion and git services commented on SOLR-13367:


Commit 85ec39d931c742b68cc1873da2fe17800eefda23 in lucene-solr's branch 
refs/heads/master from David Wayne Smiley
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=85ec39d ]

SOLR-13367: Range queries will now highlight in hl.method=unified mode.
Lucene MatchesUtils.disjunction method for disjunction over
 BytesRefIterator terms.


> Highlighting fails for Range queries on Multi-valued String fields
> --
>
> Key: SOLR-13367
> URL: https://issues.apache.org/jira/browse/SOLR-13367
> Project: Solr
>  Issue Type: Bug
>  Components: highlighter
>Affects Versions: 7.5, 7.7.1
> Environment: RedHat Linux v7
> Java 1.8.0_201
>Reporter: Karl Wolf
>Assignee: David Smiley
>Priority: Major
> Attachments: SOLR-13367.patch, SOLR-13367.patch, SOLR-13367.patch
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Range queries against multi-valued string fields produces useless 
> highlighting, even though "hl.highlightMultiTerm":"true"
> I have uncovered what I believe is a bug. At the very lease it is a 
> difference in behavior between Solr v5.1.0 and v7.5.0 (and v7.7.1).
> I have a multi-valued string Field defined in my schema as:
>  
>   multiValued="true" />
> I am using a query containing a Range clause and I am using highlighting to 
> get the list of values that actually matched the range query.
> All examples below were using the appropriate Solr Admin Server SolrCore 
> Query page.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-13367) Highlighting fails for Range queries on Multi-valued String fields

2019-06-24 Thread Alan Woodward (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-13367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16870906#comment-16870906
 ] 

Alan Woodward commented on SOLR-13367:
--

+1

> Highlighting fails for Range queries on Multi-valued String fields
> --
>
> Key: SOLR-13367
> URL: https://issues.apache.org/jira/browse/SOLR-13367
> Project: Solr
>  Issue Type: Bug
>  Components: highlighter
>Affects Versions: 7.5, 7.7.1
> Environment: RedHat Linux v7
> Java 1.8.0_201
>Reporter: Karl Wolf
>Assignee: David Smiley
>Priority: Major
> Attachments: SOLR-13367.patch, SOLR-13367.patch, SOLR-13367.patch
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Range queries against multi-valued string fields produces useless 
> highlighting, even though "hl.highlightMultiTerm":"true"
> I have uncovered what I believe is a bug. At the very lease it is a 
> difference in behavior between Solr v5.1.0 and v7.5.0 (and v7.7.1).
> I have a multi-valued string Field defined in my schema as:
>  
>   multiValued="true" />
> I am using a query containing a Range clause and I am using highlighting to 
> get the list of values that actually matched the range query.
> All examples below were using the appropriate Solr Admin Server SolrCore 
> Query page.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-13367) Highlighting fails for Range queries on Multi-valued String fields

2019-06-21 Thread David Smiley (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-13367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16869898#comment-16869898
 ] 

David Smiley commented on SOLR-13367:
-

In the latest patch I did that but called the method simply "disjunction" since 
there is in fact another disjunction method and this is another disjunction.  
So parameters differentiate them and imply what the disjunction is over/from.

> Highlighting fails for Range queries on Multi-valued String fields
> --
>
> Key: SOLR-13367
> URL: https://issues.apache.org/jira/browse/SOLR-13367
> Project: Solr
>  Issue Type: Bug
>  Components: highlighter
>Affects Versions: 7.5, 7.7.1
> Environment: RedHat Linux v7
> Java 1.8.0_201
>Reporter: Karl Wolf
>Assignee: David Smiley
>Priority: Major
> Attachments: SOLR-13367.patch, SOLR-13367.patch
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Range queries against multi-valued string fields produces useless 
> highlighting, even though "hl.highlightMultiTerm":"true"
> I have uncovered what I believe is a bug. At the very lease it is a 
> difference in behavior between Solr v5.1.0 and v7.5.0 (and v7.7.1).
> I have a multi-valued string Field defined in my schema as:
>  
>   multiValued="true" />
> I am using a query containing a Range clause and I am using highlighting to 
> get the list of values that actually matched the range query.
> All examples below were using the appropriate Solr Admin Server SolrCore 
> Query page.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-13367) Highlighting fails for Range queries on Multi-valued String fields

2019-06-11 Thread Alan Woodward (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-13367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16860656#comment-16860656
 ] 

Alan Woodward commented on SOLR-13367:
--

Let's move fromTermsEnum() into MatchesUtils.  +1 otherwise

> Highlighting fails for Range queries on Multi-valued String fields
> --
>
> Key: SOLR-13367
> URL: https://issues.apache.org/jira/browse/SOLR-13367
> Project: Solr
>  Issue Type: Bug
>  Components: highlighter
>Affects Versions: 7.5, 7.7.1
> Environment: RedHat Linux v7
> Java 1.8.0_201
>Reporter: Karl Wolf
>Assignee: David Smiley
>Priority: Major
> Attachments: SOLR-13367.patch
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Range queries against multi-valued string fields produces useless 
> highlighting, even though "hl.highlightMultiTerm":"true"
> I have uncovered what I believe is a bug. At the very lease it is a 
> difference in behavior between Solr v5.1.0 and v7.5.0 (and v7.7.1).
> I have a multi-valued string Field defined in my schema as:
>  
>   multiValued="true" />
> I am using a query containing a Range clause and I am using highlighting to 
> get the list of values that actually matched the range query.
> All examples below were using the appropriate Solr Admin Server SolrCore 
> Query page.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-13367) Highlighting fails for Range queries on Multi-valued String fields

2019-06-10 Thread David Smiley (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-13367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16860312#comment-16860312
 ] 

David Smiley commented on SOLR-13367:
-

In particular the DisjunctionMatchesIterator.fromTermsEnum static method is not 
exposed via MatchesUtils.

> Highlighting fails for Range queries on Multi-valued String fields
> --
>
> Key: SOLR-13367
> URL: https://issues.apache.org/jira/browse/SOLR-13367
> Project: Solr
>  Issue Type: Bug
>  Components: highlighter
>Affects Versions: 7.5, 7.7.1
> Environment: RedHat Linux v7
> Java 1.8.0_201
>Reporter: Karl Wolf
>Assignee: David Smiley
>Priority: Major
> Attachments: SOLR-13367.patch
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Range queries against multi-valued string fields produces useless 
> highlighting, even though "hl.highlightMultiTerm":"true"
> I have uncovered what I believe is a bug. At the very lease it is a 
> difference in behavior between Solr v5.1.0 and v7.5.0 (and v7.7.1).
> I have a multi-valued string Field defined in my schema as:
>  
>   multiValued="true" />
> I am using a query containing a Range clause and I am using highlighting to 
> get the list of values that actually matched the range query.
> All examples below were using the appropriate Solr Admin Server SolrCore 
> Query page.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-13367) Highlighting fails for Range queries on Multi-valued String fields

2019-06-10 Thread Alan Woodward (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-13367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16860302#comment-16860302
 ] 

Alan Woodward commented on SOLR-13367:
--

[~dsmiley] you should be able to use MatchesUtils.disjunction() rather than 
making DMI public

> Highlighting fails for Range queries on Multi-valued String fields
> --
>
> Key: SOLR-13367
> URL: https://issues.apache.org/jira/browse/SOLR-13367
> Project: Solr
>  Issue Type: Bug
>  Components: highlighter
>Affects Versions: 7.5, 7.7.1
> Environment: RedHat Linux v7
> Java 1.8.0_201
>Reporter: Karl Wolf
>Assignee: David Smiley
>Priority: Major
> Attachments: SOLR-13367.patch
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Range queries against multi-valued string fields produces useless 
> highlighting, even though "hl.highlightMultiTerm":"true"
> I have uncovered what I believe is a bug. At the very lease it is a 
> difference in behavior between Solr v5.1.0 and v7.5.0 (and v7.7.1).
> I have a multi-valued string Field defined in my schema as:
>  
>   multiValued="true" />
> I am using a query containing a Range clause and I am using highlighting to 
> get the list of values that actually matched the range query.
> All examples below were using the appropriate Solr Admin Server SolrCore 
> Query page.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-13367) Highlighting fails for Range queries on Multi-valued String fields

2019-06-07 Thread Karl Wolf (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-13367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16858794#comment-16858794
 ] 

Karl Wolf commented on SOLR-13367:
--

I checked again and I see that the Admin UI does put the incorrect word 
"hightlightMultiTerm" in the query URL. So that is a bug in the Admin UI. 
However, even when I edit the URL and remove the "t", I still get the same 
results. So my bug still stands.

-Karl



> Highlighting fails for Range queries on Multi-valued String fields
> --
>
> Key: SOLR-13367
> URL: https://issues.apache.org/jira/browse/SOLR-13367
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: highlighter
>Affects Versions: 7.5, 7.7.1
> Environment: RedHat Linux v7
> Java 1.8.0_201
>Reporter: Karl Wolf
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Range queries against multi-valued string fields produces useless 
> highlighting, even though "hl.highlightMultiTerm":"true"
> I have uncovered what I believe is a bug. At the very lease it is a 
> difference in behavior between Solr v5.1.0 and v7.5.0 (and v7.7.1).
> I have a multi-valued string Field defined in my schema as:
>  
>   multiValued="true" />
> I am using a query containing a Range clause and I am using highlighting to 
> get the list of values that actually matched the range query.
> All examples below were using the appropriate Solr Admin Server SolrCore 
> Query page.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-13367) Highlighting fails for Range queries on Multi-valued String fields

2019-06-07 Thread David Smiley (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-13367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16858719#comment-16858719
 ] 

David Smiley commented on SOLR-13367:
-

I think a part of the solution would involve having SolrRangeQuery extend 
MultiTermQuery if for no other reason but to advertise it's an MTQ (just like 
the standard TermRangeQuery does indirectly via AutomatonQuery).  Maybe I'll 
look later.

> Highlighting fails for Range queries on Multi-valued String fields
> --
>
> Key: SOLR-13367
> URL: https://issues.apache.org/jira/browse/SOLR-13367
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: highlighter
>Affects Versions: 7.5, 7.7.1
> Environment: RedHat Linux v7
> Java 1.8.0_201
>Reporter: Karl Wolf
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Range queries against multi-valued string fields produces useless 
> highlighting, even though "hl.highlightMultiTerm":"true"
> I have uncovered what I believe is a bug. At the very lease it is a 
> difference in behavior between Solr v5.1.0 and v7.5.0 (and v7.7.1).
> I have a multi-valued string Field defined in my schema as:
>  
>   multiValued="true" />
> I am using a query containing a Range clause and I am using highlighting to 
> get the list of values that actually matched the range query.
> All examples below were using the appropriate Solr Admin Server SolrCore 
> Query page.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-13367) Highlighting fails for Range queries on Multi-valued String fields

2019-06-07 Thread David Smiley (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-13367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16858664#comment-16858664
 ] 

David Smiley commented on SOLR-13367:
-

Thanks for reporting this.  The regression was introduced by SOLR-8037 (CC 
[~yo...@apache.org]) which introduced an new Query class internally 
–SolrRangeQuery one that the highlighters don't know about.  Thanks to recent 
improvements in Lucene that the hl.method=unified will use when 
hl.weightMatches=true, the highlighter (or at least this one) needn't be 
updated to know about new queries, at least usually not.  But this does require 
that each Query that is highlightable properly implement the "Weight Matches" 
API.  That API did not exist when SOLR-8037 was done, and when the API was 
added, some niche queries like this were not updated.

> Highlighting fails for Range queries on Multi-valued String fields
> --
>
> Key: SOLR-13367
> URL: https://issues.apache.org/jira/browse/SOLR-13367
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: highlighter
>Affects Versions: 7.5, 7.7.1
> Environment: RedHat Linux v7
> Java 1.8.0_201
>Reporter: Karl Wolf
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Range queries against multi-valued string fields produces useless 
> highlighting, even though "hl.highlightMultiTerm":"true"
> I have uncovered what I believe is a bug. At the very lease it is a 
> difference in behavior between Solr v5.1.0 and v7.5.0 (and v7.7.1).
> I have a multi-valued string Field defined in my schema as:
>  
>   multiValued="true" />
> I am using a query containing a Range clause and I am using highlighting to 
> get the list of values that actually matched the range query.
> All examples below were using the appropriate Solr Admin Server SolrCore 
> Query page.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-13367) Highlighting fails for Range queries on Multi-valued String fields

2019-06-07 Thread Karl Wolf (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-13367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16858584#comment-16858584
 ] 

Karl Wolf commented on SOLR-13367:
--

The word " hightlightMultiTerm" was due to my fumble fingers when I was typing 
up the bug report.  The admin UI uses the correct term. 

The bug I reported on is real. I first noticed it in my own application code. 
As part of debugging the issue I decided to use the Admin UI to replicate my 
query and keep my own Java code out of the equation. The admin UI demonstrates 
the same problem so that seems to indicate an underlying problem in Solr.

Thanks for looking into this.

-Karl



> Highlighting fails for Range queries on Multi-valued String fields
> --
>
> Key: SOLR-13367
> URL: https://issues.apache.org/jira/browse/SOLR-13367
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: highlighter
>Affects Versions: 7.5, 7.7.1
> Environment: RedHat Linux v7
> Java 1.8.0_201
>Reporter: Karl Wolf
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Range queries against multi-valued string fields produces useless 
> highlighting, even though "hl.highlightMultiTerm":"true"
> I have uncovered what I believe is a bug. At the very lease it is a 
> difference in behavior between Solr v5.1.0 and v7.5.0 (and v7.7.1).
> I have a multi-valued string Field defined in my schema as:
>  
>   multiValued="true" />
> I am using a query containing a Range clause and I am using highlighting to 
> get the list of values that actually matched the range query.
> All examples below were using the appropriate Solr Admin Server SolrCore 
> Query page.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-13367) Highlighting fails for Range queries on Multi-valued String fields

2019-06-07 Thread JIRA


[ 
https://issues.apache.org/jira/browse/SOLR-13367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16858556#comment-16858556
 ] 

Jan Høydahl commented on SOLR-13367:


Moved large section from description to this comment:

***
 First, a correctly working example of a range query using Solr v5.1.0 which 
produces useful results:

{code:javascript}
{
 "responseHeader": {
 "status": 0,
 "QTime": 366,
 "params":

{ "q": "MyStringField:[A TO B}

",
 "hl": "true",
 "indent": "true",
 "hl.preserveMulti": "true",
 "fl": "MyStringField,MyUniqueID",
 "hl.requireFieldMatch": "true",
 "hl.usePhraseHighlighter": "true",
 "hl.fl": "MyStringField",
 "wt": "json",
 "hl.highlightMultiTerm": "true",
 "_": "1553275722025"
 }
 },
 "response": {
 "numFound": 999,
 "start": 0,
 "docs": [

{ "MyStringField": [ "Stanley, Wendell M.", "Avery, Roy" ], "MyUniqueID": 
"UniqueID1" }

,

{ "MyStringField": [ "Avery, Roy" ], "MyUniqueID": "UniqueID2" }

,
 * 
 ** 
 *** lots more docs correctly found
 ]
 },
 *** we get to the highlighting portion of the response
 *** this indicates which values of each MyStringField
 *** that actually matched the query

"highlighting": {
 "UniqueID1":

{ "MyStringField": [ "Avery, Roy" ] }

,
 "UniqueID2":

{ "MyStringField": [ "Avery, Roy" ] }

,
 "UniqueID3":

{ "MyStringField": [ "American Institute of Biological Sciences", 
"Albritton, Errett C." ] }

,
 ... etc.
 * 
 ** 
 *** lots more useful highlight values. Note the two matching values
 *** for document UniqueID3.
 }
{code}

***
 * THE PROBLEM
 * Now using newer versions of Solr
 ***
 Using the exact same parameters with Solr v7.5.0 or v7.7.1, the top portion of 
the 
 response is basically the same including the number of documents found

{code:javascript}
{
 "responseHeader":{
 "status":0,
 "QTime":245,
 "params":

{ "q":"MyStringField:[A TO B}

",
 "hl":"on",
 "hl.preserveMulti":"true",
 "fl":"MyUniqueID, MyStringField",
 "hl.requireFieldMatch":"true",
 "hl.fl":"MyStringField",
 "hightlightMultiTerm":"true",
 "wt":"json",
 "_":"1553105129887",
 "usePhraseHighLighter":"true"}},
 "response":{"numFound":999,"start":0,"docs":[
 * 
 ** 
 *** The problem is with the lighlighting portion of the results, which is 
effectively empty.
 *** There is no way to know what values in each document that actually matched 
the query:

"highlighting":{
 "UniqueID1":{},
 "UniqueID2":{},
 "UniqueID3":{},
 ... etc.
{code}
 * 
 ** 
 *** NOTE: The source data is the same for all of the tested Solr versions and 
the Solr indexes
 *** were properly rebuilt for each Solr version.

***
 Changing the request to using the "unified" highlighter: "hl.method=unified", 
the highlighting looks like:

{code:javascript}
"highlighting":{
 "UniqueID1":

{ "MyStringField":[]}

,
 "UniqueID2":

{ "MyStringField":[]}

,
 "UniqueID3":

{ "MyStringField":[]}
{code}

,
 ... etc.
 * 
 ** 
 *** The highlighting now properly lists the matching field but still no useful 
values are listed.

***
 NOTE: if I change the query from using a Range clause to using a Wildcard 
query: q="MyStringField:A*"

the highlighting is correct in both Solr v7.5.0 and v7.7.1: These are GOOD 
results!

{code:javascript}
"highlighting":{
 "UniqueID1":

{ "MyStringField": ["Avery, Roy"]}

,
 "UniqueID2":

{ "MyStringField": ["Avery, Roy"]}

,
 "UniqueID3":

{ "MyStringField": [ "American Institute of Biological Sciences", 
"Albritton, Errett C." ] }
{code}

,
 ... etc.
 * 
 ** 
 *** This makes me think there is some problem with the way a Range query
 *** feeds the search results to the Solr Highlighter code.

***
 All attempts to vary the hl specs or any other query parameters do not solve 
the problem.
 The wildcard query is my current work around but there still is a problem with
 range queries:

In summary, there is some incompatibility among:

1) A multi-valued string field AND
 2) A range query against that field AND
 3) The result Highlighting. It is effectively empty.

I don't know when this issue was first introduced. I have recently been 
updating from 5.1.0
 to 7.5.0 in one big leap. I have attempted to read through the change logs for 
the intervening
 versions but I gave up to save my sanity.

You should be able to reproduce this issue using any multi-valued, indexed and 
stored string field.

> Highlighting fails for Range queries on Multi-valued String fields
> --
>
> Key: SOLR-13367
> URL: 

[jira] [Commented] (SOLR-13367) Highlighting fails for Range queries on Multi-valued String fields

2019-06-07 Thread JIRA


[ 
https://issues.apache.org/jira/browse/SOLR-13367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16858553#comment-16858553
 ] 

Jan Høydahl commented on SOLR-13367:


Hi

I wonder if the reason is a bug in the Admin UI query section which sets 
parameter "hightlightMultiTerm" instead of the correct "highlightMultiTerm". 
Can you try your query again manually from browser address bar with correct 
param? See [https://github.com/apache/lucene-solr/pull/704] for a fix

> Highlighting fails for Range queries on Multi-valued String fields
> --
>
> Key: SOLR-13367
> URL: https://issues.apache.org/jira/browse/SOLR-13367
> Project: Solr
>  Issue Type: Bug
>  Security Level: Public(Default Security Level. Issues are Public) 
>  Components: highlighter
>Affects Versions: 7.5, 7.7.1
> Environment: RedHat Linux v7
> Java 1.8.0_201
>Reporter: Karl Wolf
>Priority: Major
> Fix For: 5.1
>
>
> Range queries against multi-valued string fields produces useless 
> highlighting, even though "hl.highlightMultiTerm":"true"
> I have uncovered what I believe is a bug. At the very lease it is a 
> difference in behavior between Solr v5.1.0 and v7.5.0 (and v7.7.1).
> I have a multi-valued string Field defined in my schema as:
>  
>  multiValued="true" />
> I am using a query containing a Range clause and I am using highlighting to 
> get the list of values that actually matched the range query.
> All examples below were using the appropriate Solr Admin Server SolrCore 
> Query page.
> ***
> First, a correctly working example of a range query using Solr v5.1.0 which 
> produces useful results:
> {
>   "responseHeader": {
> "status": 0,
> "QTime": 366,
> "params": {
>   "q": "MyStringField:[A TO B}",
>   "hl": "true",
>   "indent": "true",
>   "hl.preserveMulti": "true",
>   "fl": "MyStringField,MyUniqueID",
>   "hl.requireFieldMatch": "true",
>   "hl.usePhraseHighlighter": "true",
>   "hl.fl": "MyStringField",
>   "wt": "json",
>   "hl.highlightMultiTerm": "true",
>   "_": "1553275722025"
> }
>   },
>   "response": {
> "numFound": 999,
> "start": 0,
> "docs": [
>   {
> "MyStringField": [
>   "Stanley, Wendell M.",
>   "Avery, Roy"
> ],
> "MyUniqueID": "UniqueID1"
>   },
>   {
> "MyStringField": [
>   "Avery, Roy"
> ],
> "MyUniqueID": "UniqueID2"
>   },
> *** lots more docs correctly found
> ]
>   },
> *** we get to the highlighting portion of the response
> *** this indicates which values of each MyStringField
> *** that actually matched the query
>   "highlighting": {
> "UniqueID1": {
>   "MyStringField": [
> "Avery, Roy"
>   ]
> },
> "UniqueID2": {
>   "MyStringField": [
> "Avery, Roy"
>   ]
> },
> "UniqueID3": {
>   "MyStringField": [
> "American Institute of Biological Sciences",
> "Albritton, Errett C."
>   ]
> },
> ... etc.
>  *** lots more useful highlight values. Note the two matching values
>  *** for document UniqueID3. 
> }
> ***
> * THE PROBLEM
> * Now using newer versions of Solr
> ***
> Using the exact same parameters with Solr v7.5.0 or v7.7.1, the top portion 
> of the 
> response is basically the same including the number of documents found
> {
>   "responseHeader":{
> "status":0,
> "QTime":245,
> "params":{
>   "q":"MyStringField:[A TO B}",
>   "hl":"on",
>   "hl.preserveMulti":"true",
>   "fl":"MyUniqueID, MyStringField",
>   "hl.requireFieldMatch":"true",
>   "hl.fl":"MyStringField",
>   "hightlightMultiTerm":"true",
>   "wt":"json",
>   "_":"1553105129887",
>   "usePhraseHighLighter":"true"}},
>   "response":{"numFound":999,"start":0,"docs":[
> *** The problem is with the lighlighting portion of the results, which is 
> effectively empty. 
> *** There is no way to know what values in each document that actually 
> matched the query:
>   "highlighting":{
> "UniqueID1":{},
> "UniqueID2":{},
> "UniqueID3":{},
> ... etc.
> *** NOTE: The source data is the same for all of the tested Solr versions and 
> the Solr indexes
> *** were properly rebuilt for each Solr version. 
> ***
> Changing the request to using the "unified" highlighter: "hl.method=unified", 
> the highlighting looks like:
>   "highlighting":{
> "UniqueID1":{
>   "MyStringField":[]},
> "UniqueID2":{
>