dev:search_changes
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| dev:search_changes [2012/09/26 12:48] – created tsbere | dev:search_changes [2022/02/10 13:34] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 96: | Line 96: | ||
| Always use the individual field_entry rows like we currently do, but look to see if " | Always use the individual field_entry rows like we currently do, but look to see if " | ||
| + | |||
| + | If the phrase has no * as the first or last character then word-boundary the start and end. Otherwise skip the word boundary where there is a *. | ||
| === Negated phrase searches === | === Negated phrase searches === | ||
| Line 113: | Line 115: | ||
| Move to an all-in-one plperlu function (maybe eventually a C func?) that does the various rel bumps based on array inputs. These may be less needed with the new method of doing things. | Move to an all-in-one plperlu function (maybe eventually a C func?) that does the various rel bumps based on array inputs. These may be less needed with the new method of doing things. | ||
| + | ===== Example searches ===== | ||
| + | |||
| + | Some fairly simplified examples without full query output for explaining some of the above. | ||
| + | |||
| + | NOTE: The examples below assume the current behavior of the - modifier. | ||
| + | |||
| + | NOTE 2: The tsquery examples below are lazy examples and would actually be built with each atom passed through to_tsquery, which would stem them as appropriate. | ||
| + | |||
| + | ==== keyword: martin luther -king ==== | ||
| + | |||
| + | === Current === | ||
| + | |||
| + | search metabib.keyword_field_entry for index_vector with tsquery " | ||
| + | |||
| + | Test Issue: If there are multiple keyword indexes with different weights and even one contains martin and luther but not king then the record will be returned. | ||
| + | |||
| + | === Proposed === | ||
| + | |||
| + | search metabib.combined_keyword_field_entry for index_vector with tsquery " | ||
| + | |||
| + | Issues solved: The combined table has all of the atoms within it, so matching on it is a one-shot. We then go back to the non-combined for ranking, which I think should be faster in the long run as we only load the records we previously identified. | ||
| + | |||
| + | ==== title: the assist ==== | ||
| + | |||
| + | === Current === | ||
| + | |||
| + | search metabib.title_field_entry for index_vector with tsquery "the & assist", | ||
| + | |||
| + | Test Issue: ' | ||
| + | |||
| + | === Proposed === | ||
| + | |||
| + | search metabib.combined_title_field_entry for index_vector with tsquery "the & assist" | ||
| + | |||
| + | Issues solved: Note that the new stock config will likely have ' | ||
| + | |||
| + | ==== title: "the assist" | ||
| + | |||
| + | === Current === | ||
| + | |||
| + | search metabib.title_field_entry for index_vector with tsquery "the & assist" | ||
| + | |||
| + | Test Issue: "the assistant" | ||
| + | |||
| + | === Proposed === | ||
| + | |||
| + | search metabib.title_field_entry for index_vector with tsquery "the & assist" | ||
| + | |||
| + | Issues solved: The word boundaries will ensure that "the assist" | ||
| + | |||
| + | ==== title|general|eng: | ||
| + | |||
| + | === Current === | ||
| + | |||
| + | search metabib.title_field_entry for index_vector with tsquery "the & assist" | ||
| + | |||
| + | Test Issue: Generally the same as the standard title search, but limited to those two indexes. | ||
| + | |||
| + | === Proposed === | ||
| + | |||
| + | search metabib.combined_title_field_entry for a combined index_vector (string_agg(index_vector:: | ||
| + | |||
| + | Issues Solved: Generally the same as the standard title search, but limiting to those two index. | ||
dev/search_changes.1348678124.txt.gz · Last modified: 2022/02/10 13:34 (external edit)