Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Disable Lucene similar term in results
- var index = Sitecore.Context.Database.Indexes["intranet"];
- IndexSearcher searcher = index.GetSearcher(Sitecore.Context.Database);
- Analyzer analyzer = new StandardAnalyzer();
- var qp = new QueryParser(Sitecore.Data.Indexing.Index.ContentFieldName,
- analyzer);
- qp.SetAllowLeadingWildcard(true);
- qp.SetDefaultOperator(QueryParser.Operator.AND);
- Query query = qp.Parse(AddQueryOptions(_searchString));
- Hits hits = searcher.Search(query);
- return hits;
Advertisement
Add Comment
Please, Sign In to add comment