omnivore-app / omnivore

Omnivore is a complete, open source read-it-later solution for people who like reading.
https://omnivore.app
GNU Affero General Public License v3.0
13.6k stars 877 forks source link

Feature Request: allow wildcard search #1951

Closed dbobak closed 1 year ago

dbobak commented 1 year ago

In many languages (inflected languages), the basic form of a word is supplemented with suffixes. Which makes a search without wildcards a tedious one. For example, when I search for texts about Ukraine, in Polish I have to search for the following forms: Ukraina, Ukrainy, Ukrainie, Ukraina, Ukraino. A wildcard search would allow the use of a single expression, e.g. Ukrain* or Ukrain%.

Would it be possible to add such a function to Omnivore?

jacksonh commented 1 year ago

Not sure what options elastic gives us here.

sywhb commented 1 year ago

@jacksonh Elasticsearch has wildcard query and the it looks like this:

GET /_search
{
  "query": {
    "wildcard": {
      "content": {
        "value": "Ukrain*",
        "boost": 1.0,
        "rewrite": "constant_score"
      }
    }
  }
}

Two operators:

But we use multi_match query now so we might need to detect * or ? in the filter string and add wildcard query if there is such operator

sywhb commented 1 year ago

Hey @dbobak, we have implemented this feature and we use * for wildcard search.

Could you please try and let us know if it suits your need? Thank you

dbobak commented 1 year ago

@sywhb, I'm not sure if I'm using it as intended, but it does not work for me. I was trying different combinations of of expressions with *, but none of it works.

image

image

sywhb commented 1 year ago

Sorry @dbobak , we reverted this feature yesterday because there was a regression bug but we have fixed it now and could you please try again?

dbobak commented 1 year ago

@sywhb, now it works perfectly! Thank you!