Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Search - make keyword search less fuzzy #126

Closed
chouseknecht opened this issue Feb 17, 2016 · 1 comment
Closed

Search - make keyword search less fuzzy #126

chouseknecht opened this issue Feb 17, 2016 · 1 comment

Comments

@chouseknecht
Copy link
Contributor

From @bcoca "just a question, if i search for something and it does not match anything ... I'm i supposed to get everything? seems like the search is really fuzzy, asdf returns many pages ..."

@chouseknecht
Copy link
Contributor Author

You should not get everything. In the case of ‘asdf’, I get 83 roles. And yes, that seems silly. In this instance it should not return anything, imho.

The ‘fuzziness’ is driven specifically by the way the index is built via django haystack. The edgengram analyzer has a min_gram value of 2. It’s tokenizing the search value by two chars and the text being searched by 2 chars. So in this case I would guess that ‘as’ can be found in all 83 roles. I could probably override the ElasticsearchBackend class and move the edgengram min_gram up to 3. That might be more sane.

So I think the work here is to bump the min_gram param in the index to 3.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant