I am indexing fields using StandardAnlyzer which removes punctuations from the input string. My input string contains special characters like @, # , -, etc.
Eg: The indexed data may consist of values like userid: AB@234, ABC#DF
I am trying to update the index passing BooleanQuery uesrid: ABC@34 to delete previous documents using writer.deletedocuments(query);
and the update the index using writer.updateDocuments(Term,document);
Deleting the current indexex using above query delete all the values that starts with ABC@.i.e, the documents with userid values ABC@123, ABC@55, etc. are also deleted.
Could any one suggest a solution to index and update specific document containing above special characters.
Any suggession is highly appreciated.
Thank in advance.
Chakradhar
The best option is probably to use KeywordAnalyzer to index your
useridfield and then use IndexWriter.deleteDocuments(Term) to delete documents.