Is there a version of the analyze api available to the Java client? I
looked around and didn't find it.
I'd like to search for documents that start with a phrase. SpanFirst looks
like it lets me search for terms at the start, so I'd like to run the
phrase through the analyzer for the field.
have a look at the integration tests
in org.elasticsearch.test.integration.indices.analyze, then you find an
example
AnalyzeResponse analyzeResponse = client.admin().indices().prepareAnalyze(
"test", "this is a test").execute().actionGet();
Cheers,
Jörg
On Monday, November 5, 2012 8:45:34 PM UTC+1, Erick Lee wrote:
Hi,
Is there a version of the analyze api available to the Java client? I
looked around and didn't find it.
I'd like to search for documents that start with a phrase. SpanFirst
looks like it lets me search for terms at the start, so I'd like to run the
phrase through the analyzer for the field.
I recreate the AnalysisModule locally and call it directly, avoiding the
network hop to Elasticsearch. It all depends on how many calls you make to
ES.
When in doubt with the Java API, look for the Rest*Action Java class (in
your case RestAnalyzeAction), or the tests as Jörg pointed out.
have a look at the integration tests
in org.elasticsearch.test.integration.indices.analyze, then you find an
example
AnalyzeResponse analyzeResponse = client.admin().indices().prepareAnalyze(
"test", "this is a test").execute().actionGet();
Cheers,
Jörg
On Monday, November 5, 2012 8:45:34 PM UTC+1, Erick Lee wrote:
Hi,
Is there a version of the analyze api available to the Java client? I
looked around and didn't find it.
I'd like to search for documents that start with a phrase. SpanFirst
looks like it lets me search for terms at the start, so I'd like to run the
phrase through the analyzer for the field.
On Monday, November 5, 2012 12:05:26 PM UTC-8, Jörg Prante wrote:
Hi Erick,
have a look at the integration tests
in org.elasticsearch.test.integration.indices.analyze, then you find an
example
AnalyzeResponse analyzeResponse = client.admin().indices().prepareAnalyze(
"test", "this is a test").execute().actionGet();
Cheers,
Jörg
On Monday, November 5, 2012 8:45:34 PM UTC+1, Erick Lee wrote:
Hi,
Is there a version of the analyze api available to the Java client? I
looked around and didn't find it.
I'd like to search for documents that start with a phrase. SpanFirst
looks like it lets me search for terms at the start, so I'd like to run the
phrase through the analyzer for the field.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.