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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

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