Comments (5)
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.
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.
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.
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.
Thank you. You did a good job.
from ghost-search.
Related Issues (12)
- Amazing, you've done a good job. HOT 1
- host instead of url HOT 2
- Is there a way to search both posts and tags?
- GhostSearch is not defined HOT 1
- Why is ghost search crashing? HOT 3
- Search for posts on subfolder
- Question: Separate Ghost search page HOT 4
- Cross-Origin Request Blocked HOT 2
- ghost-search on external frontends HOT 2
- Webpack support
- Whole screen freeze while using "Search through the title and content of posts"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghost-search.