You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by Michael Paine <mi...@justanswer.com> on 2007/01/07 05:53:07 UTC

reverse date search

Hello,
 
I have successfully been able to implement many types of searchs using
Lucene.NET, but a few still elude me, and I hope you all could give me a tip
or two.
 
I have been having troubles creating phrase type searches for fields.
Whenever I enter something like:
 
Subject:"fast car"
 
No results are returned but if I implement the following:
 
            For Each token As String In Split(SubjectQuery, " ")
                If token <> "" Then
                    query.Add(New SpanTermQuery(New Term("Subject", token)),
OccurAs)
                End If
            Next
 
I receive results (OccurAs is BooleanClause.Occur type) although the phrase
never works.  Is phrase searches supported by field typing?  If so, how
would I go about doing this?  
 
Thank you,
Michael

RE: reverse date search

Posted by George Aroush <ge...@aroush.net>.
Hi Michael,

What's in your index?  Are you sure that your field "Subject" does have
"fast car"?  To analyze your index, it is very helpful if you use Luke.  You
can get a copy from: http://www.getopt.org/luke/

Regards,

-- George Aroush


-----Original Message-----
From: Michael Paine [mailto:michael@justanswer.com] 
Sent: Saturday, January 06, 2007 11:53 PM
To: lucene-net-dev@incubator.apache.org
Subject: reverse date search

Hello,
 
I have successfully been able to implement many types of searchs using
Lucene.NET, but a few still elude me, and I hope you all could give me a tip
or two.
 
I have been having troubles creating phrase type searches for fields.
Whenever I enter something like:
 
Subject:"fast car"
 
No results are returned but if I implement the following:
 
            For Each token As String In Split(SubjectQuery, " ")
                If token <> "" Then
                    query.Add(New SpanTermQuery(New Term("Subject", token)),
OccurAs)
                End If
            Next
 
I receive results (OccurAs is BooleanClause.Occur type) although the phrase
never works.  Is phrase searches supported by field typing?  If so, how
would I go about doing this?  
 
Thank you,
Michael