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 po...@freenet.de on 2011/03/28 11:16:21 UTC
Highlighting Problem
dear solr specialists,
my data looks like this:
j]s(dh)fjk [hf]sjkadh asdj(kfh) [skdjfh aslkfjhalwe uigfrhj bsd bsdfga sjfg asdlfj.
if I want to query for the first "word", the following queries must match:
j]s(dh)fjk
j]s(dhfjk
j]sdhfjk
jsdhfjk
dhf
So the matching should ignore some characters like ( ) [ ] and should match substrings.
So far I have the following field definition in the schema.xml:
With this definition the matching works as planned. But not for highlighting, there the special characters seem to move the tags to wrong positions, for example searching for "jsdhfjk" misses the last 3 letters of the words ( = 3 special characters from PatternReplaceFilterFactory)
j]s(dh)fjk
Solr has so many bells and whistles - what must I do to get a correctly working highlighting?
kind regards,
F.
---
Zeigen Sie uns Ihre beste Seite und gewinnen Sie ein iPad!
Machen Sie mit beim freenet Homepage Award 2011
RE: Highlighting Problem
Posted by Pierre GOSSE <pi...@arisem.com>.
Look like special chars are filtered at index time and not replaced by space that would keep correct offset of terms. Can you paste here the definition of the fieldtype in your shema.xml ?
Pierre
-----Message d'origine-----
De : pottwal1@freenet.de [mailto:pottwal1@freenet.de]
Envoyé : lundi 28 mars 2011 11:16
À : solr-user@lucene.apache.org
Objet : Highlighting Problem
dear solr specialists,
my data looks like this:
j]s(dh)fjk [hf]sjkadh asdj(kfh) [skdjfh aslkfjhalwe uigfrhj bsd bsdfga sjfg asdlfj.
if I want to query for the first "word", the following queries must match:
j]s(dh)fjk
j]s(dhfjk
j]sdhfjk
jsdhfjk
dhf
So the matching should ignore some characters like ( ) [ ] and should match substrings.
So far I have the following field definition in the schema.xml:
With this definition the matching works as planned. But not for highlighting, there the special characters seem to move the tags to wrong positions, for example searching for "jsdhfjk" misses the last 3 letters of the words ( = 3 special characters from PatternReplaceFilterFactory)
j]s(dh)fjk
Solr has so many bells and whistles - what must I do to get a correctly working highlighting?
kind regards,
F.
---
Zeigen Sie uns Ihre beste Seite und gewinnen Sie ein iPad!
Machen Sie mit beim freenet Homepage Award 2011