You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by neosky <ne...@yahoo.com> on 2012/03/19 02:16:29 UTC

Does the Solr provide hightlight token position in the field?

Does the hightlight can provide the exact position of the query
For instance:
MSAQLRKPTA*RVCES*CGRAEHWDDDLEAWQIARTDGTKQVGSPHCLHEWDINGNFNPVAMDD
I want to know the Position of "R" in the highlight token.
I want to do the secondary query based on the position, Thanks!

--
View this message in context: http://lucene.472066.n3.nabble.com/Does-the-Solr-provide-hightlight-token-position-in-the-field-tp3837895p3837895.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Does the Solr provide hightlight token position in the field?

Posted by neosky <ne...@yahoo.com>.
Thanks! I look at the api carefully before, but not very sure.
So,it seems that the highlighter might not be helpful.
I am considering alternative solution for this problem.
I would like to what exactly want, for instance I got a candidate record
from my query:RVCES(I implement a 5 gram index)
 MSAQLRKPTA*RVCES*CGRAEHWDDDLEAWQIARTDGTKQVGSPHCLHEWDINGNFNPVAMDD 
But what I want to search is RVCESCG which is 7 characters
 MSAQLRKPTA*RVCESCG*RAEHWDDDLEAWQIARTDGTKQVGSPHCLHEWDINGNFNPVAMDD 
one solution is that if the solr can provides the offset of the R, I could
compare the next 7 characters with my query.It will be very fast and I can
do the highlight myself.
Another solution is to compare the field with my full query using some match
functions with regular expression.
It should be low efficiency and might not provide the offset position.
Do you any guys have suggestion for this? Thanks!

--
View this message in context: http://lucene.472066.n3.nabble.com/Does-the-Solr-provide-hightlight-token-position-in-the-field-tp3837895p3839699.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Does the Solr provide hightlight token position in the field?

Posted by Ahmet Arslan <io...@yahoo.com>.
> Does the hightlight can provide the
> exact position of the query
> For instance:
> MSAQLRKPTA*RVCES*CGRAEHWDDDLEAWQIARTDGTKQVGSPHCLHEWDINGNFNPVAMDD
> I want to know the Position of "R" in the highlight token.
> I want to do the secondary query based on the position,

There is an unresolved jira issue for this: 

https://issues.apache.org/jira/browse/SOLR-1954