Giter Club home page Giter Club logo

Comments (7)

jasonbosco avatar jasonbosco commented on June 10, 2024

This is an expected error, by design.

From the docs:

If the document contains an id field of type string, Typesense will use that field as the identifier for the document. Otherwise, Typesense will assign an auto-generated identifier to the document. Since it's a special field, the id field is not required to be defined as part of the collection schema.

from typesense.

abcdan avatar abcdan commented on June 10, 2024

Interesting, many thanks. One question: I've seen that before. But: why does this not happen when ID is not the beginning, as per searchable_id?

from typesense.

jasonbosco avatar jasonbosco commented on June 10, 2024

This is because only a field called id specifically is a special field. Other fields that end with _id are not automatically used as an id field and don't have any specific meaning inside of Typesense.

from typesense.

abcdan avatar abcdan commented on June 10, 2024

Alright, so "id_search" will always give this error and "search_id" won't. Thanks!

from typesense.

jasonbosco avatar jasonbosco commented on June 10, 2024

No, a field named id_search should not throw any errors in the logs, when mentioned in the schema.

from typesense.

abcdan avatar abcdan commented on June 10, 2024

No, a field named id_search should not throw any errors in the logs, when mentioned in the schema.

Interesting, but on 26.0 when I use id_search it gives an error and searchable_id for example does not.

from typesense.

jasonbosco avatar jasonbosco commented on June 10, 2024

Hmm, I don't see the same issue.

I used this gist to run Typesense. Then created a collection using a field called id_search and no errors were logged. Then created a field called id and the error was logged.

Screenshot 2024-04-16 at 9 45 44 AM

from typesense.

Related Issues (20)

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.