[jira] [Comment Edited] (SOLR-4722) Highlighter which generates a list of query term position(s) for each item in a list of documents, or returns null if highlighting is disabled.

2018-03-19 Thread Bram Vereertbrugghen (JIRA)

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

Bram Vereertbrugghen edited comment on SOLR-4722 at 3/19/18 1:55 PM:
-

As a response to [~TamerBoz]:

What I did was the following:
 1. place the solr-positionshighlighter.jar into /opt/solr/server/solr/lib, 
where Solr could find it. (Note: I'm running Solr in a docker container, so our 
paths will be different).

Then in mycore/conf/solrconfig.xml:

2. Create the searchComponent using the above snippets and name it 
'highlighter' (I didn't want to deal with duplicate naming or overwritten 
issues, so I played it safe).
{code:java}
 
    
 {code}
3. Either create a new requestHandler for testing, or append it to an existing 
one using  This is a new endpoint where the highlighting will be 
the new highlighter:
{code:java}
  
    
  true
  json
  true
    
    
  highlighter
    
  
{code}
4. Make the following call (change the url so it points to your core and solr 
instance):
{noformat}
http://localhost:8002/solr/mycore/test-point?hl.fl=tm_field_test=on=on=tm_field_test:test=json{noformat}
This will output a highlighting array containing a number, and this number 
contains the position of the word in the document.
NOTE: I found very strange results when using this .jar on documents where the 
values were arrays. If this is your case, be prepared to rewrite some stuff (or 
find the correct interpretation of the results).

 

 


was (Author: darm):
As a response to [~TamerBoz]:

What I did was the following:
1. place the solr-positionshighlighter.jar into /opt/solr/server/solr/lib, 
where Solr could find it. (Note: I'm running Solr in a docker container, so our 
paths will be different).
2. Create the searchComponent using the above snippets and name it 
'highlighter' (so I could be able to outrule duplicate naming issues).
{code:java}
 
    
 {code}
3. Create a new requestHandler explicitly using this way of highlighting.
{code:java}
  
    
  true
  json
  true
    
    
  highlighter
    
  
{code}
4. Make the followinhg call:
{noformat}
http://localhost:8002/solr/mycore/test-point?hl.fl=tm_field_test=on=on=tm_field_test:test=json{noformat}
This makes the call

 

 

> Highlighter which generates a list of query term position(s) for each item in 
> a list of documents, or returns null if highlighting is disabled.
> ---
>
> Key: SOLR-4722
> URL: https://issues.apache.org/jira/browse/SOLR-4722
> Project: Solr
>  Issue Type: New Feature
>  Components: highlighter
>Affects Versions: 4.3, 6.0
>Reporter: Tricia Jenkins
>Priority: Minor
> Attachments: PositionsSolrHighlighter.java, SOLR-4722.patch, 
> SOLR-4722.patch, solr-positionshighlighter.jar
>
>
> As an alternative to returning snippets, this highlighter provides the (term) 
> position for query matches.  One usecase for this is to reconcile the term 
> position from the Solr index with 'word' coordinates provided by an OCR 
> process.  In this way we are able to 'highlight' an image, like a page from a 
> book or an article from a newspaper, in the locations that match the user's 
> query.
> This is based on the FastVectorHighlighter and requires that termVectors, 
> termOffsets and termPositions be stored.



--
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] [Comment Edited] (SOLR-4722) Highlighter which generates a list of query term position(s) for each item in a list of documents, or returns null if highlighting is disabled.

2013-04-16 Thread Tricia Jenkins (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-4722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13633305#comment-13633305
 ] 

Tricia Jenkins edited comment on SOLR-4722 at 4/16/13 9:51 PM:
---

Loosely related to SOLR-1954 and SOLR-1397.  SOLR-1954 is looking at exposing 
offsets and score in addition to snippets.  SOLR-1397 is looking to highlight 
external fields, say from a database, with a Solr highlighter (and analysis).

  was (Author: pgwillia):
Loosely related to SOLR-1954 and SOLR-1397.  SOLR-1954 is looking at 
exposing offsets and score in addition to snippets.  SOlR-1397 is looking to 
highlight external fields, say from a database, with a Solr highlighter (and 
analysis).
  
 Highlighter which generates a list of query term position(s) for each item in 
 a list of documents, or returns null if highlighting is disabled.
 ---

 Key: SOLR-4722
 URL: https://issues.apache.org/jira/browse/SOLR-4722
 Project: Solr
  Issue Type: New Feature
  Components: highlighter
Affects Versions: 4.3, 5.0
Reporter: Tricia Jenkins
Priority: Minor
 Attachments: SOLR-4722.patch, solr-positionshighlighter.jar


 As an alternative to returning snippets, this highlighter provides the (term) 
 position for query matches.  One usecase for this is to reconcile the term 
 position from the Solr index with 'word' coordinates provided by an OCR 
 process.  In this way we are able to 'highlight' an image, like a page from a 
 book or an article from a newspaper, in the locations that match the user's 
 query.
 This is based on the FastVectorHighlighter and requires that termVectors, 
 termOffsets and termPositions be stored.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Comment Edited] (SOLR-4722) Highlighter which generates a list of query term position(s) for each item in a list of documents, or returns null if highlighting is disabled.

2013-04-16 Thread Tricia Jenkins (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-4722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13633426#comment-13633426
 ] 

Tricia Jenkins edited comment on SOLR-4722 at 4/16/13 9:52 PM:
---

Solr plug-in jar compiled against 4.1.0.  Place this into your 
solr.home/collection/lib directory and configure conf/solrconfig.xml
{code:xml}searchComponent class=solr.HighlightComponent name=highlight
  highlighting class=org.apache.solr.highlight.PositionsSolrHighlighter 
summarizeEmpty=false/
/searchComponent
{code} 
 to use.

  was (Author: pgwillia):
Solr plug-in jar compiled against 4.1.0.  Place this into your 
solr.home/collection/lib and configure conf/solrconfig.xml
{code:xml}searchComponent class=solr.HighlightComponent name=highlight
  highlighting class=org.apache.solr.highlight.PositionsSolrHighlighter 
summarizeEmpty=false/
/searchComponent
{code} 
 directory to use.
  
 Highlighter which generates a list of query term position(s) for each item in 
 a list of documents, or returns null if highlighting is disabled.
 ---

 Key: SOLR-4722
 URL: https://issues.apache.org/jira/browse/SOLR-4722
 Project: Solr
  Issue Type: New Feature
  Components: highlighter
Affects Versions: 4.3, 5.0
Reporter: Tricia Jenkins
Priority: Minor
 Attachments: SOLR-4722.patch, solr-positionshighlighter.jar


 As an alternative to returning snippets, this highlighter provides the (term) 
 position for query matches.  One usecase for this is to reconcile the term 
 position from the Solr index with 'word' coordinates provided by an OCR 
 process.  In this way we are able to 'highlight' an image, like a page from a 
 book or an article from a newspaper, in the locations that match the user's 
 query.
 This is based on the FastVectorHighlighter and requires that termVectors, 
 termOffsets and termPositions be stored.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Comment Edited] (SOLR-4722) Highlighter which generates a list of query term position(s) for each item in a list of documents, or returns null if highlighting is disabled.

2013-04-16 Thread Tricia Jenkins (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-4722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13633307#comment-13633307
 ] 

Tricia Jenkins edited comment on SOLR-4722 at 4/16/13 9:52 PM:
---

Stems from the same usecase as SOLR-380.

  was (Author: pgwillia):
Stems from the same usecase.
  
 Highlighter which generates a list of query term position(s) for each item in 
 a list of documents, or returns null if highlighting is disabled.
 ---

 Key: SOLR-4722
 URL: https://issues.apache.org/jira/browse/SOLR-4722
 Project: Solr
  Issue Type: New Feature
  Components: highlighter
Affects Versions: 4.3, 5.0
Reporter: Tricia Jenkins
Priority: Minor
 Attachments: SOLR-4722.patch, solr-positionshighlighter.jar


 As an alternative to returning snippets, this highlighter provides the (term) 
 position for query matches.  One usecase for this is to reconcile the term 
 position from the Solr index with 'word' coordinates provided by an OCR 
 process.  In this way we are able to 'highlight' an image, like a page from a 
 book or an article from a newspaper, in the locations that match the user's 
 query.
 This is based on the FastVectorHighlighter and requires that termVectors, 
 termOffsets and termPositions be stored.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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