Git Product home page Git Product logo

Comments (5)

NistorCristian avatar NistorCristian commented on July 29, 2024 1

Now, in version 1.0.1 you can change the api parameters limit too. Keep in mind that if you change this value you might not get the same results as you should. If you have a small blog you can leave it to all. Up to 200 posts should work without a problem especially because, by default, we only get the title and the slug.

If you have a lot of posts you could change this value and set it to a number that makes sense. You could look at how many posts you published in the latest 2-3 years and perform the search only on those posts. Not ideal but better than a slow, very slow, search. Or you could use filter parameter and set the published_at greater than a specific date.

from ghost-search.

NistorCristian avatar NistorCristian commented on July 29, 2024

Hi,

limit = 'all' is mandatory because there is no other way to do this in Ghost, at this moment. If you set limit to 10 you will search only in the latest 10 posts. So if you have 100 posts and search for 'car', you will search in the latest 10 posts. Maybe you have 'car' as a word in posts 23, 44, etc too. Those will not return if you change the value to 10.

The 'fields' value should work. I tested and it does.

If you want to limit the number of posts that you want to show see Option's limit.

Thanks for pointing out that I have to update the docs for v2. Will do these days.

Let me know if this is clear enough.

from ghost-search.

godofredoninja avatar godofredoninja commented on July 29, 2024

Hi 😄

The limit of 10 only I gave you as an example.

Having limit = 'all' on small web pages is perfect.

But if the page has about 5 thousand post this is no longer good. because you have to download a large amount of data and this becomes a very heavy json.

That is why the post limit so that it can work well with a certain amount of data.

Have a good day 😄

from ghost-search.

NistorCristian avatar NistorCristian commented on July 29, 2024

Yeah, if you have 5000 posts the search will most likely break. So limit should be editable I guess. Another way to 'limit' could be to filter the posts that were published in the last 1-2 years. Depends on how regulary you post. I will make it editable in the next release.

from ghost-search.

godofredoninja avatar godofredoninja commented on July 29, 2024

Thank you. You did a good job.

from ghost-search.

Related Issues (11)

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.