FAQ
Hello everybody,

I have s slight problem using lucenes highlighter. If i have the highlighter
enabled, a query creates 0 hits, if i disable the highlighter i get the
hits.
It seems like, when i call searcher.search() and pass my Hits hits to the
highlighter function, the program quits. All prints after the highlighter
call also do not appear.
I have no idea what the problem is.

Thanks in advise

Jens Burkhardt
--
View this message in context: http://www.nabble.com/Highlighter-Hits-tp16002424p16002424.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org

Search Discussions

  • Erick Erickson at Mar 12, 2008 at 2:14 pm
    What does your stack trace look like? I've never seen Lucene "just quit"
    without throwing an exception, and printStackTrace() is your friend.....

    Or are you catching exceptions without logging them? If so, shame
    on you <G>.....

    Best
    Erick

    P.S. I can't recommend strongly enough that you get a good IDE
    and debug in it. I spent far too much of my life debugging with
    printlns and never, ever want to go back there again... Eclipse
    is free if sometimes "interesting" to set up. IntelliJ is sweet. And
    a unit test or two will help significantly too. Sorry if you know all this,
    but your comment about prints lights me right up <G>.....


    On Wed, Mar 12, 2008 at 9:54 AM, JensBurkhardt wrote:


    Hello everybody,

    I have s slight problem using lucenes highlighter. If i have the
    highlighter
    enabled, a query creates 0 hits, if i disable the highlighter i get the
    hits.
    It seems like, when i call searcher.search() and pass my Hits hits to the
    highlighter function, the program quits. All prints after the highlighter
    call also do not appear.
    I have no idea what the problem is.

    Thanks in advise

    Jens Burkhardt
    --
    View this message in context:
    http://www.nabble.com/Highlighter-Hits-tp16002424p16002424.html
    Sent from the Lucene - Java Users mailing list archive at Nabble.com.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Matthew Hall at Mar 12, 2008 at 5:56 pm
    I suspect you are using a different analyzer to highlight than you are
    using to search.

    A couple of things you can check:

    Immediately after your query simply print out hits.length, this should
    conclusively tell you that you query is in fact working, after that
    ensure that you are using the same analyzer for your highlighter that
    you are for your query parser.

    If you are not, its entirely possible that the text you are trying to
    highlight with is being transformed differently than how it was in the
    query, and as a result isn't matching against your fields anymore.

    Hope that helps,

    Matt

    JensBurkhardt wrote:
    Hello everybody,

    I have s slight problem using lucenes highlighter. If i have the highlighter
    enabled, a query creates 0 hits, if i disable the highlighter i get the
    hits.
    It seems like, when i call searcher.search() and pass my Hits hits to the
    highlighter function, the program quits. All prints after the highlighter
    call also do not appear.
    I have no idea what the problem is.

    Thanks in advise

    Jens Burkhardt

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedMar 12, '08 at 1:54p
activeMar 12, '08 at 5:56p
posts3
users3
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase