Hi,

How do I perform the best query for searching member names such as "robert alexander pohl". I want to first display the exact match, and then people that is called "robert alexander" or "robert pohl" and at last just "robert"

How can I achieve this?

My query looks like this now, bit it doesn show good results:


           BooleanQuery query = new BooleanQuery();
Query q1 = Similarity.Net.SimilarityQueries.FormSimilarQuery(searchQuery, new StandardAnalyzer(), "DisplayName", null); Query q2 = Similarity.Net.SimilarityQueries.FormSimilarQuery(searchQuery + "*", new StandardAnalyzer(), "DisplayName", null);
           q1.SetBoost(10f);
           query.Add(q1, BooleanClause.Occur.MUST);
           query.Add(q2, BooleanClause.Occur.SHOULD);

Reply via email to