voc / voctoweb

voctoweb – the frontend and backend software behind media.ccc.de
GNU General Public License v3.0
189 stars 58 forks source link

Improve search query - don't just "and" words #57

Open saerdnaer opened 8 years ago

saerdnaer commented 8 years ago

since https://github.com/voc/media-search-prototype/commit/3e585c4a6b72959c92fdd240b92405372d262be0 the media.ccc.de search prefers matches which match all the search terms, which is actually the best way for most cases.

In some rare changes it would be nice if the user could switch back to the old method, e.g. when a want a list of all talks given by a speaker, which uses two different names for nicknames.

Such search request could look like nick OR surname .

saerdnaer commented 8 years ago

Maybe switching/add an option to switch from multi_match to simple_query_string is also an valid idea. compare https://www.elastic.co/guide/en/elasticsearch/reference/2.0/full-text-queries.html

manno commented 8 years ago

see #42

saerdnaer commented 8 years ago

So we now use https://github.com/elastic/elasticsearch-rails and have to find the corresponding config file which was formerly https://github.com/voc/media-search-prototype/blob/master/server/search.pl#L34-L105

saerdnaer commented 8 years ago

It's now in https://github.com/voc/voctoweb/blob/master/app/models/concerns/elasticsearch_event.rb#L29-L59

saerdnaer commented 1 year ago

TODO: expose query string, cf. https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html