C# Class WorldNet.Net.SynExpand

Expand a query by looking up synonyms for every term. You need to invoke Syns2Index first to build the synonym index.
Mostrar archivo Open project: synhershko/lucene.net

Public Methods

Method Description
Expand ( String query, Searcher syns, Analyzer a, String field, float boost ) : Query

Perform synonym expansion on a query.

Private Methods

Method Description
Main ( String args ) : void

Method Details

Expand() public static method

Perform synonym expansion on a query.
public static Expand ( String query, Searcher syns, Analyzer a, String field, float boost ) : Query
query String users query that is assumed to not have any "special" query syntax, thus it should be just normal words, so "big dog" makes sense, but a query like "title:foo^1.2" doesn't as this should presumably be passed directly to the default query parser
syns Lucene.Net.Search.Searcher a opened to the Lucene index you previously created with . The searcher is not closed or otherwise altered.
a Lucene.Net.Analysis.Analyzer optional analyzer used to parse the users query else is used
field String optional field name to search in or null if you want the default of "contents"
boost float optional boost applied to synonyms else no boost is applied
return Lucene.Net.Search.Query