Hello everyone,
I am lucene user and tried to implement pharse query, But now getting some
logical problems in searching..
My index have 4 fields: Name, Address & City and 6 docs.
i.e 1. "Laxmilal Menaria", "Hiran Magri", "Udaipur",
2. "Mohan Sharma", "Hiran Magri Sec 10", "Udaipur"
3. "Rohit Bhargav", "Suraj pole", "Udaipur"
4. "Laxmilal", "Hiran Magri Sec 4", "Ahemdabad"
5. "Chandresh" , "Bihar", "Patna"
6. "James", "Hiran Magri 18", "Delhi"
Now search Address:"Hiran Magri" and got 4 results, But I want 1 result
only(Document-1), so what should I do ?
My Search code is :
sQuery="Hiran Magri"
.
.
Dim lucQuery As Lucene.Net.Search.Query = New
Lucene.Net.QueryParsers.QueryParser("Address", New
Lucene.Net.Analysis.Standard.StandardAnalyzer).Parse(sQuery)
Dim lucHits As Lucene.Net.Search.Hits =
lucIndexSearcher.Search(lucQuery)
Dim intHitCount As Integer = lucHits.Length
--
Thanks,
Laxmilal menaria
http://www.minalyzer.com/
http://www.chambal.com/