ABS
ABS

Reputation: 11

Elastic Search SQL Server

We are trying to implement free text search using elastic search.

The Plan is to use

OurApplication | NEST | Elastic Search | ????????????? | SQL Server

The database is SQL Server and Create, Update and Delete operations on tables are performed by mutiple applications.

How can I populate and refresh indexes in elastic search ?

I went through River JDBC route, people are saying that it will be depreciated in the further releases ?

If I use River JDBC how can I refresh the indexes when updates happen ?

Upvotes: 1

Views: 873

Answers (2)

Best Solution For that JDBC importer

The Java Database Connection (JDBC) importer allows to fetch data from JDBC sources for indexing into Elasticsearch. The JDBC importer was designed for tabular data. If you have tables with many joins, the JDBC importer is limited in the way to reconstruct deeply nested objects to JSON and process object semantics like object identity. Though it would be possible to extend the JDBC importer with a mapping feature where all the object properties could be specified, the current solution is focused on rather simple tabular data streams.

You can use script file for jdbc database connection and for query.you store the data in index and used this index on application. You can refresh the index by Setting a cron expression in the parameter schedule enables repeated (or time scheduled).

Example of a schedule parameter: "schedule" : "0 0-59 0-23 ? * *" This executes JDBC importer every minute, every hour, all the days in the week/month/year. and index get fresh data every minute.

Also JDBC importer support mysql, PostgreSQL. JDBC importer provide Many feature.

For details :https://github.com/jprante/elasticsear

Upvotes: 0

Rana Rashid
Rana Rashid

Reputation: 202

In simple what you can do is when any operation performed like update, add or delete then call respective function of elastic search. Like when a record updated then call a function which updates that record with index and type in the elastic data. Same thing with write and delete operation. I used same thing for auto suggestion and text free search in my term project. Regards

Upvotes: 2

Related Questions