Lucene.Net – Remove Stop Words from the Search Query

Lucene.Net – Remove Stop Words from the Search Query

 
   /*
 
       The Unit of Search Parameter is Word. ( Not Enable Wildcard Search )
       For Example, Value – "I am in Hong-Kong."
 
       Hong-Kong – can be searched.
       Hong – can be searched.
       Kong – can be searched.
       HongKong – cannot be searched.
       I – can be searched.
       I am – can be searched.
 
       The Search Practice is to read the whole set of record from Database Table and Assign it to the Object Collection Variable.
       Then, Assign the Object Collection Value to the Lucene Index ( Physical Index File ).
       The Object Collection can be searched based on Specific Property Value or Full Text Search ( All Properties ).
 
       Some Common Words would be filtered out from Lucene Search Query.
       By Default, it would be ignored to be searched. ( For Example : in, ……, etc …… )
       Following Code is to remove the filter to let All Common Words which can be searched by using Lucene. ( Remove Stop Words ).
 
   */

 
   using Lucene.Net.Analysis.Standard;
 
   … …
 
   // Assign a Blank Set Collection from the StandardAnalyzer Object.
   var analyzer = new StandardAnalyzer( Version.LUCENE_30, new HashSet<string>() );
 

Hello World of Lucene.Net …