wmde / LOSH-Frontend

1 stars 3 forks source link

Functional description should be added to search query #79

Closed botoxparty closed 2 years ago

botoxparty commented 2 years ago

The search query currently only searches the name.

This should be modified from a match query to a multi_match query.

Currently this can't be completed as the data is indexed into Elasticsearch as an array of statement_keywords. The functional description should be added to the index as a text field (See evaluation of querying options)

e.g.

   statement_keywords: [
      'P1344=https://wikifactory.com/@yyazji/mini-cnc-machine/20190523064001/MiniCncMachine',
      'P1532=en',
      'P505=20190523064001',
      'P1463=Mini CNC machine is implemented at Fablab Gaza with almost 3D printing parts , nema 17 stepper motor. the 3D parts of machine are designed using Solid works software.',
      'P467=Yousef Alyazji',
      'P1411=https://wikifactory.com/@yyazji/mini-cnc-machine',
      'P1452=N/A',
      'P1426=https://github.com/OPEN-NEXT/OKH-LOSH/raw/master/OKH-LOSH.ttl#Module',
      'P1422=https://wikifactory.com/@yyazji/mini-cnc-machine'
    ],

cc: @moedn

moedn commented 2 years ago

@botoxparty thanks for looking into this :)

@ckawohl-wmde is this something that needs to happen on the crawler side or rather the reconcile-edit?

addshore commented 2 years ago

As far as I can tell the search does cover descriptions

https://losh.ose-germany.de/index.php?search=%22Either+a+module+%28MOSH%29%22+hasdescription%3Aen+&title=Special%3ASearch&profile=default&fulltext=1

That is an exact match of some text in the description of an item

Also works without the hasdescription bit, I'm just adding that to show that feature too

https://losh.ose-germany.de/index.php?search=%22Either+a+module+%28MOSH%29%22&title=Special%3ASearch&profile=default&fulltext=1

moedn commented 2 years ago

Hey ho, thanks for working on this! As discussed, that's the crucial issue in fact. However, in the currently deployed version of the frontend, searching the functional description doesn't seem to work yet:

  1. I randomly picked ROTOCASTit, that has the functional description "ROTOCASTit is a rotational casting machine that features an innovative ball-bearing structure […]"
  2. When I type "casting" or "cast" ROTOCASTit doesn't appear. It seems like only names are searched. However, fuzzy search seems to work since projects with "case" in their name also show up

Maybe there's a switch that needs to be flipped yet? :)