polifonia-project / facets-search-engine

6 stars 0 forks source link

search curl: "facet" or combined search? #97

Closed TiangeZhu closed 11 months ago

TiangeZhu commented 1 year ago

Do we allow faceted search in rest api? If we do, there is almost no difference between faceting and a combined search(text+pattern) at this point because all facets we have are metadata. The only difference would be: if facet-composer is specified, then it only checks the composer field, instead of this text in title+composer+lyrics. and in the codes, this difference would be: to send it as a part of search to ES, or filter when we have the matching document list from ES like the faceting in UI.

However, if we "facet":

  1. Facets such as "composer" should be added to search context, instead of using "text" field.
  2. It can use the faceted result filtering code for UI but certain things should be done there to make it work
  3. If not (2), we make the text search work.
  4. Make some test cases with composer(&others) facets in json format like the other ones in "queries" folder.

currently we do have "composer" in search context, but it does not really work, codes are missing. once it is working it should be tested!