java - Lucene : IndexWriter.update - how to form term for searching numeric values -


My index has the following fields: ID (type long, indexed, archived, not analyzed), content (string, not indexed) ), Not analyzed, archived) and tags (string, indexed, analyzed, archived).

Content for a given ID needs updating - How to use IndexWriter.update? How do I make words?

If the ID is stored in the form of a string, then I can make the term as a new term (id, "some ADI") - but there is no mention about long / string conversion etc. Other effects will be. Assuming your ID is a numeric field, then have a look at the "longToPrefixCoded" function.

"NumericUtils" namespace.

Hope it helps,


Comments