Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Paul Masurel
    @fulmicoton
    : []
    data: []
    I thought this worked.
    None does not work
    madmaxio
    @madmaxio
    Ah you are talking about json macro syntax
    Paul Masurel
    @fulmicoton
    yes.
    Your question was quite inaccurate wasn't it : your problem was in fact can tantivy deserialize a doc in which one field has the null value I believe.
    madmaxio
    @madmaxio
    Yeah ofcourse
    Paul Masurel
    @fulmicoton
    so if your JSON contains [] as a value it should work
    or if the field is not there at all it should work too (I think)
    if your serialization is based on serde there is an attribute that should do the job
    madmaxio
    @madmaxio
    Ok, I will check.
    Paul Masurel
    @fulmicoton
    #[serde(skip_serializing_if = "Option::is_none")]
    ther e might be a nicer shorter magical formula though
    (serde really is awesome)
    madmaxio
    @madmaxio
    wow "Option::is_none" is crazy stuff
    madmaxio
    @madmaxio
    Ye, it worked, very nice solution
    Paul Masurel
    @fulmicoton
    sweet
    stoically
    @stoically
    is my assumption correct that its not possible to change the fields of an existing schema, but rather a new schema would need to be created and the index rebuild?
    Paul Masurel
    @fulmicoton
    t is kind of true yes.
    stoically
    @stoically
    what does "kind of" mean? :D are there workarounds?
    Paul Masurel
    @fulmicoton
    It may or may not work if you just add a new field... I forgot.
    Or rather it is designed in such a way it might work but
    It is not tested so it probably doesn't
    stoically
    @stoically
    oh ok, so in theory it could work already, architecture-wise - but not officially supported
    that's good to know
    Paul Masurel
    @fulmicoton
    Only adding fields...
    Paul Masurel
    @fulmicoton
    If you have super important use case let me know
    stoically
    @stoically
    nothing important, just trying to dig into what might be possible with regards to search and how tantivy fits into the picture
    it just seems appealing to be able to insert documents in a schema-less-ish way (like it's possible with e.g. algolia)
    but i'm sure that comes with a full set of trade-offs
    Paul Masurel
    @fulmicoton
    published 0.11
    stoically
    @stoically
    \o/
    Paul Masurel
    @fulmicoton

    it just seems appealing to be able to insert documents in a schema-less-ish way

    yeah... That's something that could be fun to work on

    petr-tik
    @petr-tik

    published 0.11

    Stick it up on reddit as well?

    Paul Masurel
    @fulmicoton

    but i'm sure that comes with a full set of trade-offs

    Not that much actually. Well it depends on which field/feature you want...

    Paul Masurel
    @fulmicoton
    if you just want "search" without scoring , and fastfield it is quite feasible actually.
    in tantivy that would probably be done by adding a type in the schema that would be called dynamic, or json or whatever
    and then the json fields would be searchable... The scoring would suck a little though
    WIth a hashing trick, we could get soething close to BM25 scoring maybe
    it would not even be that difficult to implement.
    probably <3 days for me.
    stoically
    @stoically
    that sounds awesome :D
    Paul Masurel
    @fulmicoton
    Yes... But I don't have 3 days unfortunately :D
    stoically
    @stoically
    well
    Paul Masurel
    @fulmicoton
    maybe i should put that a higher priority now that we have python support.
    stoically
    @stoically
    i'll do it in 2 :P
    but for real tho, tantivy is already awesome as it is
    i hope i get the chance to contribute one day, after catching up on rust and search, so might be a while :D
    Paul Masurel
    @fulmicoton
    Looking forward to your PR !