Completion suggester with jdbc river


(leningrast-2) #1

Hi,

I plan to use ES with jprantes JDBC-River
https://github.com/jprante/elasticsearch-river-jdbc, a completion
suggester
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters-completion.html
and a Postgresql Database in my next project.

I tested the combination of ES, the JDBC-River and Postgres, it worked well
for me. My problem is that i have no clue how i could built an index like
the example index http://www.elasticsearch.org/blog/you-complete-me/ on
the ES completion suggester website (blog):

curl -X PUT localhost:9200/hotels/hotel/1 -d '
{
"name" : "Mercure Hotel Munich",
"city" : "Munich",
"name_suggest" : {
"input" : [
"Mercure Hotel Munich",
"Mercure Munich"
]
}
}'

Complete suggesters are build on top of a search graph. Each user input
reduces the pathes on the graph. But only exact matches will remain. If
multiple queries should leed to one result, the ES website suggests to
provide multiple "input" fields like above. I will have thousands of
documents and can not craft my index manually like it seems on the site.

My question is now: How can i automatically build an ES index with a
JDBC-River?

I hope you can give me some input. Thanks in advance!

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8d30f5cd-2b28-42d2-9af0-6fc7af872520%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Jörg Prante) #2

You have two options:

  • create all indices/mappings you need before instantiating a JDBC river
    instance. This is the preferred option.

  • or you can include a single index settings/mappings JSON into the JDBC
    river instantiation command

Jörg

On Sun, Jun 29, 2014 at 7:43 PM, leningrast markus.bayer85@gmail.com
wrote:

Hi,

I plan to use ES with jprantes JDBC-River
https://github.com/jprante/elasticsearch-river-jdbc, a completion
suggester
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters-completion.html
and a Postgresql Database in my next project.

I tested the combination of ES, the JDBC-River and Postgres, it worked
well for me. My problem is that i have no clue how i could built an index
like the example index
http://www.elasticsearch.org/blog/you-complete-me/ on the ES completion
suggester website (blog):

curl -X PUT localhost:9200/hotels/hotel/1 -d '
{
"name" : "Mercure Hotel Munich",
"city" : "Munich",
"name_suggest" : {
"input" : [
"Mercure Hotel Munich",
"Mercure Munich"
]
}
}'

Complete suggesters are build on top of a search graph. Each user input
reduces the pathes on the graph. But only exact matches will remain. If
multiple queries should leed to one result, the ES website suggests to
provide multiple "input" fields like above. I will have thousands of
documents and can not craft my index manually like it seems on the site.

My question is now: How can i automatically build an ES index with a
JDBC-River?

I hope you can give me some input. Thanks in advance!

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/8d30f5cd-2b28-42d2-9af0-6fc7af872520%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/8d30f5cd-2b28-42d2-9af0-6fc7af872520%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHNwJ7ZrvJpY%3DArByfRTmaeDVaVMT0O-%3DZEO1S026fhXQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(system) #3