Stack Overflow Asked by Dmitriy Dumanskiy on December 18, 2021
I have a document that contains tags
field, I add it like this:
for (Tag tag : tags) { //rock, disco, jazz
fields.add(new StringField("Tag", tag.name, Field.Store.YES))
}
Now, when I perform the search I would like to get not only document that has a tag, but also specific index within the Tag
field that matches the query.
For, example, now when I search for jazz
I need also within search results index=2
. To know exact tag that was matched (because I use also prefix search and phrase search).
How can I achieve that with Lucene?
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP