Git Product home page Git Product logo

omeka-typesense-search's People

Contributors

joeirimpan avatar knadh avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

itsam

omeka-typesense-search's Issues

When type is "resource" nothing is indexed

Let's say one of the indexed field is:

  1. dcterms:title

When you create an item and set dcterms:title to any literal text (e.g. "My nice title") then everything works nice.

If instead of Text though you want to add an Omeka resource then nothing happens because there is no "@value" to use for the indexing. One solution is to check if the field is of type "resource" and then instead of @value to use "display_title"

I hope it's clear what the problem is exactly...

For type: "literal" an example (which works fine) of an item is

    {
      "type": "literal",
      "property_id": 2,
      "property_label": "Title",
      "is_public": true,
      "@value": "My nice title"  <--- you are using this (correctly)
    },

For type: "resource" an example (which doesn't work) of an item is

    {
      "type": "resource",
      "property_id": 2,
      "property_label": "Title",
      "is_public": true,
      "@id": "https:\/\/example.com\/api\/items\/16",
      "value_resource_id": 16,
      "value_resource_name": "items",
      "url": null,
      "display_title": "Another omeka item",    <--- use this instead
      "thumbnail_url": "",
      "thumbnail_title": "",
      "thumbnail_type": null
    },

Thank you in advance

Update an item creates a new record

Hello, first of all thank you for your effort.

There are the following cases that triggers indexing

  1. When a new item is created: Everything works as expected and the item correctly is getting indexed
  2. When an existing item is deleted: Everything works as expected. The item is deleted from typesense server
  3. When an existing item is updated. The problem here is that a new "identical" index is created (which is wrong).

Sneaking a little bit I believe the problem is on Module.php and specifically to
public function updateSearchIndex(Event $event): void

Any help or idea would be appreciated. Thanks in advance

Proposal: Allow to set facet on fields

Would be nice idea if for any of the selected fields in the module's configuration to have a flag (checkbox) next to it that when is selected to set this field as facet as well.

I believe it's straightforward and allows to create more advanced interfaces using typesense's javascript

For example

{"name": "dcterms_creator", "type": "string[]", "facet": true, "infix": true }   

I would say the most time consuming is on the UI rather than setting the "schema" to include "facet":true
At the moment I am doing this by PATCHing my collection but it's not optimal and have to re-patch in every re-index

Let me know what you think.
Thank you in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.