Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi, I am trying to achieve multiple partial word search on a single field. My search syntax looks like below.

VB
Dim terms = searchstring.Trim().Split(" "c).Where(Function(x) Not String.IsNullOrEmpty(x)).[Select](Function(x) x.Trim() + "* &&")
        searchstring = String.Join(" ", terms)
        searchResults = LuceneSearch.SearchDefault(searchstring, "Address")


The result I am getting is below

http://s13.postimg.org/80kdhapt3/result.jpg

The result I am trying to achieve is below

http://s23.postimg.org/40i9wewbf/resultto_achieve.jpg

As you can see I am searching for "Bank Station London". I have entered "Bank" and "Station" in full but "Londo" partial. Even though I have used AND operator it ignored the third word as it only partially matches. Is there any way to achieve this. Even if the word is partial the probability/ranking is based on all three words.

Thanks.
Posted
Updated 10-Oct-13 10:14am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900