capstone
capstone copied to clipboard
Fix boolean search
This PR addresses the issue around boolean search failure due to ES not searching across multiple fields when using the AND keyword.
To fix, I implemented copy_to
to grab the content of all the fields we wanted to search into a single field that could be searched.
This is what happens when you search "Argued before BELL" AND "rationale of Gardner"
on the live site:
That's because the first phrase is in the
head_matter
field and the second is in casebody_data.opinions.text
.
This is what happens when you run the same search with this change:
Deploying this will require running fab rebuild_search_index
on prod, so we will have to plan when that is appropriate.
Codecov Report
Merging #2132 (d881f5b) into develop (b96efcb) will increase coverage by
0.00%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## develop #2132 +/- ##
========================================
Coverage 63.19% 63.20%
========================================
Files 106 106
Lines 11518 11521 +3
========================================
+ Hits 7279 7282 +3
Misses 4239 4239
see 3 files with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
LGTM2! Note that this will increase the index size, so disk space on prod could be a question; not sure if there's a way to estimate.
That is a good question. Let me try to find out. Also @bensteinberg I wondered whether we'd want to push the piece that is necessary for the reindex, run the reindex, then push the change to search. Idk if that's overkill...
@jcushman can you clarify for me: what is our plan should the index size outgrow disk space? Will we increase the disk space?
@jcushman can you clarify for me: what is our plan should the index size outgrow disk space? Will we increase the disk space?
That's my expectation. But Ben would have to be in charge of how that happens, and LOE.