tantivy icon indicating copy to clipboard operation
tantivy copied to clipboard

add search_tokenizer on TextFieldIndexing

Open mlvzk opened this issue 4 years ago • 4 comments
trafficstars

This feature let's you define a different tokenizer for searching than indexing. This doesn't break previous functionality, because it defaults to the indexing tokenizer if search_tokenizer was not specified.

This is called "search_analyzer" in Elasticsearch. https://www.elastic.co/guide/en/elasticsearch/reference/current/search-analyzer.html

That link also explains why it's useful:

Sometimes, though, it can make sense to use a different analyzer at search time, such as when using the edge_ngram tokenizer for autocomplete or when using search-time synonyms.

Issue for this PR: #1074

mlvzk avatar Jun 06 '21 14:06 mlvzk

@mlvzk Can you open an issue to host the discussion? (In the future, please do that before opening a PR.)

fulmicoton avatar Jun 07 '21 00:06 fulmicoton

@fulmicoton I opened an issue. Was that what you meant? I couldn't find this in other PRs, other than your last one. Should I just open a PR with Issue/<issue_id> as title next time?

mlvzk avatar Jun 07 '21 11:06 mlvzk

@mlvzk Yes it is fine.

ideally, it is better to add Closes #1074 in your commit message to automatically link the PR and the issue, and to autoclose the issue upon closing.

We don't do that for all PR though.

fulmicoton avatar Jun 08 '21 02:06 fulmicoton

@mlvzk what is the status of this PR? Have you addressed the changes from @PSeitz ?

fulmicoton avatar Jun 25 '21 04:06 fulmicoton