lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukas Vlcek" <lukas.vl...@gmail.com>
Subject multi-field and wildcard query highlighter questions
Date Fri, 20 Jul 2007 14:41:10 GMT
Hi,

I have two questions:

1) Is it possible to get some highlighted text when using wildcard query? (I
am using query rewrite)
I found that it works for queries like [prefix*suffix] or [prefix?suffix]
but I was not able to get results for queries like [prefix*]

2) What kind of problems I should expect when trying to get highlighted
fragment(s) from multi-filed document? (I mean when the document has more
fields of the same name).
So far I am often experiencing StringIndexOutOfBoundsException (see example
below):

SEVERE: String index out of range: 17
java.lang.StringIndexOutOfBoundsException: String index out of range: 17
        at java.lang.String.substring(String.java:1765)
        at
org.apache.lucene.search.highlight.Highlighter.getBestTextFragments(
Highlighter.java:235)
        at org.apache.lucene.search.highlight.Highlighter.getBestFragments(
Highlighter.java:175)
        at org.apache.lucene.search.highlight.Highlighter.getBestFragment(
Highlighter.java:101)
        at
org.compass.core.lucene.engine.LuceneSearchEngineHighlighter.collectionFragment
(LuceneSearchEngineHighlighter.java:204)
        at
org.compass.core.lucene.engine.LuceneSearchEngineHighlighter.collectionFragment
(LuceneSearchEngineHighlighter.java:189)
        at
org.compass.core.impl.DefaultCompassHighlighter.collectionFragment(
DefaultCompassHighlighter.java:127)
... [truncated]
... [also you can notice that I am using Compass above Lucene but to me this
seems like Lucene related problem because index seems to be OK (via Luke)]

I am using Lucene-2.2.0.

Regards,
Lukas

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message