Code Monkey home page Code Monkey logo

Comments (7)

matteodem avatar matteodem commented on May 17, 2024

Are you using Elastic Search or Mongo DB?

from meteor-easy-search.

petermikitsh avatar petermikitsh commented on May 17, 2024

MongoDB.

from meteor-easy-search.

matteodem avatar matteodem commented on May 17, 2024

As you can see in the components the search results are mapped onto collections again, https://github.com/matteodem/meteor-easy-search/blob/master/lib/components/easy-search-components.js#L229.

I feel like using the limit property instead of _.first may fix it. https://github.com/matteodem/meteor-easy-search/blob/master/lib/easy-search-server.js#L270

I'll have a look at it this weekend.

from meteor-easy-search.

matteodem avatar matteodem commented on May 17, 2024

It actually needs more than just that. I'll reference #25 here because both are smiliar in terms of code changes. The thing is that the search is performed on the server-side, for Elastic-Search and other Search Indexes to also to be compatible.

I'll try to make a mapping where the results returned are (if configured or by default) re-mapped onto reactive mongodb documents). Also curious why the provided Blaze Components aren't useable for the solution you need, can you inform me about the problems?

from meteor-easy-search.

petermikitsh avatar petermikitsh commented on May 17, 2024

My apologies for the late reply. Currently I am using a mixture of the Blaze components and API calls from your package.

I initially augmented the example {#ifEsIsSearching} example from the README for my use case, but the result seemed incorrect; the number of records returned was a subset of the true search result. I would need to confirm that I was using the components properly, however.

Alternatively, I used a keyup event listener on the esInput component. Calling EasySearch.search would return the correct search result.

from meteor-easy-search.

matteodem avatar matteodem commented on May 17, 2024

ifEsIsSearching is used for content while someone is searching. Did you by any chance have a subscription which had only let the user see a subset of the results? Since it has to be reactive, the way the Blaze Components make them is by mapping their id's back to Mongo Docs on the client side, if the client doesn't have access to the full set, then it won't be possible to make all of them reactive.

I'll make a clear section in the README regarding visibility and permissions

from meteor-easy-search.

matteodem avatar matteodem commented on May 17, 2024

It is reactive now, as used here:

https://github.com/matteodem/meteor-easy-search/blob/master/lib/components/easy-search-components.js#L96

Re-open if needed.

from meteor-easy-search.

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.