PouchDB.find pagination solution - pagination

I am trying to find the best solution to paginate with PouchDB-find plugin.
for now I am using the options: "limit" and "skip" to paginate my results but this solution is not recommended for large collections: https://docs.cloudant.com/cloudant_query.html#finding-documents-using-an-index and https://pouchdb.com/2014/04/14/pagination-strategies-with-pouchdb.html.
I know PouchDB-find is inspired by Cloudant which offers a "bookmark" option to help with pagination.
Any idea if "bookmark" is available on PouchDB-find or if it will be implemented soon ?

Related

Implementing a docs search for multiple docs sites

We have many different documentation sites and I would like to search a keyword across all of these sites. How can I do that?
I already thought about implementing a simple web scraper, but this seems like a very ugly solution.
An alternative may be to use Elasticsearch and somehow point it to the different doc repos.
Are there better suggestions?
Algolia is the absolute best solution that I can think of. There's also Typesense and Meilisearch of course.
Algolia is meant specifically for situations like yours, so it even comes with a crawler.
https://www.algolia.com/products/search-and-discovery/crawler/
https://www.algolia.com/
https://typesense.org/
https://www.meilisearch.com/
Here's a fun page comparing them (probably a little biased in Typesense's favor)
https://typesense.org/typesense-vs-algolia-vs-elasticsearch-vs-meilisearch/
Here are some example sites that use Algolia Search
https://developers.cloudflare.com/
https://getbootstrap.com/docs/5.1/getting-started/introduction/
https://reactjs.org/
https://hn.algolia.com/
If you personally are just trying to search for a keyword, as long as they're indexed by Google, you can always search with the format site:{domain} "keyword"
You can checkout Meilisearch for your use case. Meilisearch is a Rust based and open sourced search engine.
Meilisearch comes with a document scraper tool ( https://github.com/meilisearch/docs-scraper ) that can scrape content and then also index it.
While using it you need to define what exact content you are searching for in the configuration file for the scraper tool. And then you can run the tool using Docker.

Creating a search with Sails.js and MongoDB

I'm wanting to create a search page in Sails.js that will search through a MongoDB. I know how to accomplish this. However, I was wondering if there is a way with Waterline, or any other option, to account for typos and alternate spellings. For example. If the MongoDB entry is "Springfield High School" how can I account for "Springfield High-School" or "Spring Field High School" etc... I'm assuming if this is possible it's done with Waterline some way, but I haven't been able to find any good documentation (findLike()???).
MongoDB supports full text search through text indexes, including search string tokenization and simple language-specific stemming. See the linked page for a full description of features.

How to use lucene query syntax on Orchard CMS

I would like to use the full Lucene query syntax on an Orchard CMS based Website.
Currently, after enabling the indexing and search on Orchard, I can search on the website according to the fields I selected on the Orchard search administration page,
but I cannot perform one search on a particular field only (without changing the behavior on the entire search)
I cannot use fuzzy search...
From the logs, I can see that Orchard take care of that part (providing Lucene a good query syntax), but I would like to do it on my own.
For example, when searching "wel" on the website, Orchard will send to Lucene this query : title:wel* body:wel* (if I have the title and body fields activated on the search).
I did see some blogs that talk about coding some features to customize search, but I would like to be sure I'm not missing something before switching to developer mode :)
There are so many scenarios that can be done with search that there is no way to provide such coverage out of the box, which is why the API is very simple to use if you need custom searching capabilities.
You should copy-paste the controller from the search module and use the Parse() method of the ISearchBuilder with the escape parameter to false. This will parse a pure lucene query. You can also use the WithField("body", "value") to do simpler field search.
I don't believe anyone has released any modules that provide additional search functionality, because if you need it, it is so simple to develop ^_^ So yes, you will have to go dev mode to do custom field search

CakePHP 1.3 : Merge Two Model Pagination in single view?

I have two Model with no relationship between them i need to display it in single view file with cakephp Paging or Custom Paging.
Kindly help me...
If I were you, create a view in mysql that is a UNION of the tables in question. Then create a model for that view and paginate that.
Probably the easiest way!
Use import, http://book.cakephp.org/1.3/view/936/Importing-Controllers-Models-Components-Behaviors-
and then you can do pagination on both. Note that I think you would have to do some sort of jquery/ajax pagination to have both work properly on a single page.

Cursoring in lucene

How to set cursoring (for the purpose of pagination) with the search result which I obtained from lucene search. Is there any ways to do that in lucene?
Regards,
Jagadesh
While surfing, I found http://hrycan.com/2010/02/10/paginating-lucene-search-results/. Should do what you want.
There is a method specifically dedicated to pagination: IndexSearcher.searchAfter(). In most cases this should be the best option.

Resources