solr - Prioritize results sandwiched in tags -


i have documents indexed like

{ "content":"lots of text , html", "file_type": "application/pdf", "id": "path_to_file", "comp": "irrelevant fields", "_version_": 1506272321148522231 } 

i want solr prioritize results contain queried keyword in <abc> , </abc> tags. how can done? have searched lot , didn't relevant answer.

you might able boost @ query-time using regex query.

however, instead, i'd suggest parsing innertext of <abc>something</abc> it's own field @ index-time (making easy boost @ query-time).

this pre-processing can either done hand, or using patterncapturegroupfilterfactory in custom analysis chain.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -