0

Any idea for count phrase frequecy , like function termfrequecy with sort asc,desc - and number found for the field ?

Data:

ID / name / surname

  1. / Test / Test Info
  2. / Test Info / test

Query:

http://localhostsolr/select?q=name:test info OR surname:test info

I would have expected an answer:

{
"responseHeader": {
"zkConnected": true,
"status": 0,
"QTime": 0,
"params": {
"q": "*.*",
"fl": "id"
}
},
"response": {
"numFound": 2,
"start": 0,
"docs": [
{
"id": "1",
"counterInName": 1,
"counterInSubname": 0,
},
{
"id": "2",
"counterInName": 0,
"counterInSubname": 1,
}
]
}
}
  • Do you have an example for what you want to achieve? It's hard to say from your question. Please add more details. – MatsLindh Aug 10 '20 at 18:41
  • I added a description – Bartek Bednarek Aug 10 '20 at 19:09
  • 1
    There are some strategies for how to do this in https://stackoverflow.com/questions/25038080/how-can-i-tell-solr-to-return-the-hit-search-terms-per-document/25038386#25038386 - but as far as I can tell there is nothing explicit available that does what you want (and be aware - your query doesn't search for what you think - it searches for `test` in `name`, and then `info` in the default search field, or-ed with `test` in `surname`, then `info` in the default search field again. – MatsLindh Aug 10 '20 at 21:07
  • Thank you for the advice – Bartek Bednarek Aug 11 '20 at 14:23

0 Answers0