The battle between a directory:
And search:
Has been won long ago.
Providing a search feature is important for good user experience.
Unfortunately it is not a simple task.
Elasticsearch is a search framework built over Lucene. Lucene is an open source project for text search. (Note that the forum search and similar threads features are also powered by Lucene.)
Elasticsearch simplifies many tasks required to build a search engine and adds many features over Lucene.
Elasticsearch is quite similar to MongoDB. It is also a document store. However the use cases and focus are different. Elasticsearch stores the data in a Lucene index and offers powerful text features.
jElasticsearch is a wrapper for the REST client provided by Elasticsearch.
It is expected to be used from a server solution.
The attached example implements a simple search engine that builds an index from B4X libraries files and allows searching them.
Note that it uses the new Background Worker feature of jServer library: https://www.b4x.com/android/forum/threads/73269/#content
It depends on jServer v2.70+.
The worker checks for updates every 10 minutes.
Building a good search engine is not simple. It requires learning the main search concepts and the many available options.
I recommend starting with the guide: https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html
And reference: https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html
Elasticsearch can be downloaded here: https://www.elastic.co/downloads/elasticsearch
You need to start Elasticsearch.bat and then run the example.
jElasticsearch depends on several additional jars:
www.b4x.com/b4j/files/jElasticsearch_additional.zip
Copy them to the additional libraries folder.
V1.10 - Fixes compatibility with ES6.0. Note that you need to download jElasticsearch_additional as well.
And search:
Has been won long ago.
Providing a search feature is important for good user experience.
Unfortunately it is not a simple task.
Elasticsearch is a search framework built over Lucene. Lucene is an open source project for text search. (Note that the forum search and similar threads features are also powered by Lucene.)
Elasticsearch simplifies many tasks required to build a search engine and adds many features over Lucene.
Elasticsearch is quite similar to MongoDB. It is also a document store. However the use cases and focus are different. Elasticsearch stores the data in a Lucene index and offers powerful text features.
jElasticsearch is a wrapper for the REST client provided by Elasticsearch.
It is expected to be used from a server solution.
The attached example implements a simple search engine that builds an index from B4X libraries files and allows searching them.
Note that it uses the new Background Worker feature of jServer library: https://www.b4x.com/android/forum/threads/73269/#content
It depends on jServer v2.70+.
The worker checks for updates every 10 minutes.
Building a good search engine is not simple. It requires learning the main search concepts and the many available options.
I recommend starting with the guide: https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html
And reference: https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html
Elasticsearch can be downloaded here: https://www.elastic.co/downloads/elasticsearch
You need to start Elasticsearch.bat and then run the example.
jElasticsearch depends on several additional jars:
www.b4x.com/b4j/files/jElasticsearch_additional.zip
Copy them to the additional libraries folder.
V1.10 - Fixes compatibility with ES6.0. Note that you need to download jElasticsearch_additional as well.
Attachments
Last edited: