Reputation: 11
I have a search that queries to the Solr data. And it works mostly correct. However the result is not sorted the way I'd expect it to. There is; name, description and id and I'd like a way to make the ID more important in the search. Now, an exact match of ID does not put the result on top of the results. Which is what should happen. Even if another result has the same queried string in its name field.
qf, didn't help because when I add it, only exact matches return. Any help is appreciated
Below objects when searched for: 123456 Should return [C, B, A], because say ID matters more
A: {
id: 678678,
name: 'some name',
desc: '123456',
},
B: {
id: 456456,
name: '123456',
desc: 'some desc',
},
C: {
id: 123456,
name: 'some name',
desc: 'some desc',
},
Lastly we do have; defType=edismax and some other fields
adding qf to the parameters qf=id^10 name^7 desc^5
was tried like so, without any luck
Upvotes: 1
Views: 75