FAQ
Hi,

I just changed from Lucene 2.4.1 to Lucene 3.0.0 to use the
FastVectorHighlighter, because I've large documents to search and hope for
better highlighting performance.
If I call the getBestFragments method I didn't get fragments for truncated
queries (f.e. Ipod*), simple none truncated queries are still working fine.

Thanks in advance,
Arne
--
View this message in context: http://old.nabble.com/FastVectorHighlighter-truncated-queries-tp27709797p27709797.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

  • Chris Lu at Feb 23, 2010 at 9:47 pm
    This should be a common wildcard query highlighting problem.
    You will need to query.rewrite() first, and pass the result to the
    highlighter.

    --
    Chris Lu
    -------------------------
    Instant Scalable Full-Text Search On Any Database/Application
    site: http://www.dbsight.net
    demo: http://search.dbsight.com
    Lucene Database Search in 3 minutes: http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3_minutes
    DBSight customer, a shopping comparison site, (anonymous per request) got 2.6 Million Euro funding!


    halbtuerderschwarze wrote:
    Hi,

    I just changed from Lucene 2.4.1 to Lucene 3.0.0 to use the
    FastVectorHighlighter, because I've large documents to search and hope for
    better highlighting performance.
    If I call the getBestFragments method I didn't get fragments for truncated
    queries (f.e. Ipod*), simple none truncated queries are still working fine.

    Thanks in advance,
    Arne
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Halbtuerderschwarze at Feb 24, 2010 at 8:23 am
    query.rewrite() didn't help, for queries like ipod* or *ipod I still didn't
    get fragments.

    Arne



    chrislusf wrote:
    This should be a common wildcard query highlighting problem.
    You will need to query.rewrite() first, and pass the result to the
    highlighter.

    --
    Chris Lu
    -------------------------
    Instant Scalable Full-Text Search On Any Database/Application
    site: http://www.dbsight.net
    demo: http://search.dbsight.com
    Lucene Database Search in 3 minutes:
    http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3_minutes
    DBSight customer, a shopping comparison site, (anonymous per request) got
    2.6 Million Euro funding!


    halbtuerderschwarze wrote:
    Hi,

    I just changed from Lucene 2.4.1 to Lucene 3.0.0 to use the
    FastVectorHighlighter, because I've large documents to search and hope
    for
    better highlighting performance.
    If I call the getBestFragments method I didn't get fragments for
    truncated
    queries (f.e. Ipod*), simple none truncated queries are still working
    fine.

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

    --
    View this message in context: http://old.nabble.com/FastVectorHighlighter-truncated-queries-tp27709797p27714123.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
  • Koji Sekiguchi at Feb 24, 2010 at 11:41 am

    halbtuerderschwarze wrote:
    query.rewrite() didn't help, for queries like ipod* or *ipod I still didn't
    get fragments.

    Arne
    You're right. This is still an open issue:

    https://issues.apache.org/jira/browse/LUCENE-1889

    Koji

    --
    http://www.rondhuit.com/en/


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Digy at Mar 3, 2010 at 9:07 pm
    Before query.Rewrite



    if query is MultiTermQuery then


    ((MultiTermQuery)query).setRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUER
    Y_REWRITE);



    solved my problem.



    DIGY





    -----Original Message-----
    From: halbtuerderschwarze
    Sent: Wednesday, February 24, 2010 11:46 AM
    To: java-user@lucene.apache.org
    Subject: Re: FastVectorHighlighter truncated queries





    query.rewrite() didn't help, for queries like ipod* or *ipod I still didn't

    get fragments.



    Arne







    chrislusf wrote:

    >
    This should be a common wildcard query highlighting problem.
    You will need to query.rewrite() first, and pass the result to the
    highlighter. >
    --
    Chris Lu
    -------------------------
    Instant Scalable Full-Text Search On Any Database/Application
    site: http://www.dbsight.net
    demo: http://search.dbsight.com
    Lucene Database Search in 3 minutes:
    >
    http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3_m
    inutes
    DBSight customer, a shopping comparison site, (anonymous per request) got
    2.6 Million Euro funding!
    >

    >
    halbtuerderschwarze wrote:
    Hi,
    >>
    I just changed from Lucene 2.4.1 to Lucene 3.0.0 to use the
    FastVectorHighlighter, because I've large documents to search and hope
    for
    better highlighting performance.
    If I call the getBestFragments method I didn't get fragments for
    truncated
    queries (f.e. Ipod*), simple none truncated queries are still working
    fine.
    >>
    Thanks in advance,
    Arne
    >>

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

    >

    >



    --

    View this message in context:
    http://old.nabble.com/FastVectorHighlighter-truncated-queries-tp27709797p277
    14123.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
  • Halbtuerderschwarze at Mar 4, 2010 at 4:15 pm
    I tried MultiTermQuery in combination with setRewriteMethod:
    MultiTermQuery mtq = new WildcardQuery(new Term(FIELD, queryString));
    mtq.setRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE);

    Did you also use Lucene 3.0.0?



    --
    View this message in context: http://old.nabble.com/FastVectorHighlighter-truncated-queries-tp27709797p27782929.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
  • Digy at Mar 4, 2010 at 5:19 pm
    I used Lucene.Net 2.9.2. Didn't it work?

    DIGY

    -----Original Message-----
    From: halbtuerderschwarze
    Sent: Thursday, March 04, 2010 6:15 PM
    To: java-user@lucene.apache.org
    Subject: RE: FastVectorHighlighter truncated queries


    I tried MultiTermQuery in combination with setRewriteMethod:
    MultiTermQuery mtq = new WildcardQuery(new Term(FIELD, queryString));
    mtq.setRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE);

    Did you also use Lucene 3.0.0?



    --
    View this message in context:
    http://old.nabble.com/FastVectorHighlighter-truncated-queries-tp27709797p277
    82929.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


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Halbtuerderschwarze at Mar 4, 2010 at 9:22 pm
    Not with Lucene 3.0.1.
    Tomorrow I will try it with 2.9.2.
    Arne
    --
    View this message in context: http://old.nabble.com/FastVectorHighlighter-truncated-queries-tp27709797p27786722.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
  • Digy at Mar 4, 2010 at 9:48 pm
    I don't think that it is related with lucene version.

    Please inspect the C# code below. "fragments1" has no highlight info, on the
    other hand "fragments2" has one.





    RAMDirectory dir = new RAMDirectory();

    IndexWriter wr = new IndexWriter(dir, new WhitespaceAnalyzer(),
    true);

    Document doc = new Document();

    doc.Add(new Field("f1", "aaa aab aac aad", Field.Store.YES,
    Field.Index.ANALYZED,Field.TermVector.WITH_POSITIONS_OFFSETS));

    wr.AddDocument(doc);

    wr.Close();



    IndexReader rdr = IndexReader.Open(dir, true);



    QueryParser p = new QueryParser("f1", new WhitespaceAnalyzer());

    Query q = p.Parse("aa*");



    Lucene.Net.Search.Vectorhighlight.FastVectorHighlighter fvh =
    new Lucene.Net.Search.Vectorhighlight.FastVectorHighlighter();



    string[] fragments1 =
    fvh.GetBestFragments(fvh.GetFieldQuery(q.Rewrite(rdr)), rdr, 0, "f1", 100,
    2);



    if (q is MultiTermQuery)

    {


    ((MultiTermQuery)q).SetRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_RE
    WRITE);

    }

    string[] fragments2 =
    fvh.GetBestFragments(fvh.GetFieldQuery(q.Rewrite(rdr)), rdr, 0, "f1", 100,
    2);





    DIGY





    -----Original Message-----
    From: halbtuerderschwarze
    Sent: Thursday, March 04, 2010 11:22 PM
    To: java-user@lucene.apache.org
    Subject: RE: FastVectorHighlighter truncated queries





    Not with Lucene 3.0.1.

    Tomorrow I will try it with 2.9.2.

    Arne

    --

    View this message in context:
    http://old.nabble.com/FastVectorHighlighter-truncated-queries-tp27709797p277
    86722.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
  • Halbtuerderschwarze at Mar 5, 2010 at 8:56 am
    Thank you very much.
    You are right, queries like aa* really work fine, even in Lucene 3.0.1 :)
    But I still have problems getting fragments for queries like aa* AND *ac
    (parser.setAllowLeadingWildcard(true); is set).
    --
    View this message in context: http://old.nabble.com/FastVectorHighlighter-truncated-queries-tp27709797p27791329.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
  • Digy at Mar 5, 2010 at 6:13 pm
    queryParser.SetMultiTermRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_R
    EWRITE);

    DIGY

    -----Original Message-----
    From: halbtuerderschwarze
    Sent: Friday, March 05, 2010 10:56 AM
    To: java-user@lucene.apache.org
    Subject: RE: FastVectorHighlighter truncated queries


    Thank you very much.
    You are right, queries like aa* really work fine, even in Lucene 3.0.1 :)
    But I still have problems getting fragments for queries like aa* AND *ac
    (parser.setAllowLeadingWildcard(true); is set).
    --
    View this message in context:
    http://old.nabble.com/FastVectorHighlighter-truncated-queries-tp27709797p277
    91329.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


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Halbtuerderschwarze at Mar 5, 2010 at 8:53 pm
    Thats the solution. Thanks a lot.
    --
    View this message in context: http://old.nabble.com/FastVectorHighlighter-truncated-queries-tp27709797p27799057.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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedFeb 23, '10 at 8:20p
activeMar 5, '10 at 8:53p
posts12
users4
websitelucene.apache.org

People

Translate

site design / logo © 2021 Grokbase