Re: ElasticSearch 1.1.0 equivalent to field query filter

2014-05-23 Thread Mukul Gupta
Actually, I tried using the term filter but it doesn't work when the field on which it is applied is not present in all the documents. It works fine if the field is present in all the documents. Thanks, On Thu, May 22, 2014 at 10:33 PM, Ivan Brusic i...@brusic.com wrote: Why not use a term

Re: ElasticSearch Version problem

2014-05-22 Thread Mukul Gupta
from the database. Jörg On Tue, May 20, 2014 at 7:00 PM, Mukul Gupta mukulnit...@gmail.comwrote: Yeah..I switched to JDBC 1.1.0.2 and it is now updating indexed docs but still few issues are there. 1. Though JDBC can now index docs but not all Mysql docs are getting index. I tried

Re: ElasticSearch Version problem

2014-05-17 Thread Mukul Gupta
Can we use jdbc river plugin for older versions of ES 0.90.3 ? On Sat, May 17, 2014 at 2:50 AM, joergpra...@gmail.com joergpra...@gmail.com wrote: Rivers did not change since ES 1.0.0 so I'm quite confident that https://github.com/richardwilly98/elasticsearch-river-mongodb 2.0.0 will run

Re: ElasticSearch Version problem

2014-05-17 Thread Mukul Gupta
, 2014 at 8:36 AM, Mukul Gupta mukulnit...@gmail.comwrote: Can we use jdbc river plugin for older versions of ES 0.90.3 ? On Sat, May 17, 2014 at 2:50 AM, joergpra...@gmail.com joergpra...@gmail.com wrote: Rivers did not change since ES 1.0.0 so I'm quite confident that https://github.com

Re: query_string bug in Elasticsearch-0.90.3, please tell me if it really is a bug ?

2014-02-05 Thread Mukul Gupta
Hi Adrien, Great to hear from you !!! Actually you have written in your post that query_string splits on whitespaces before applying analyzer. Are you sure it applies it before analyzer because if it works that way, the I won't be getting the above issue. Above results shows that analyzer works

Re: query_string bug in Elasticsearch-0.90.3, please tell me if it really is a bug ?

2014-02-05 Thread Mukul Gupta
Adrien, Regarding the boosting issue: I have a field text and I'm using a query-time boost like field=[text^30] Assume I have a doc like {text:new delhi to goa}. Now if I query for delhi to goa then score for only term goa is boosted like goa^30 (as you can see above in explain output) but what I

Re: What is the difference between query_string and multi-match for querying docs ?

2014-02-04 Thread Mukul Gupta
Brusic i...@brusic.com wrote: Try using the plugin I suggested and/or the explain API. http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-explain.html On Mon, Feb 3, 2014 at 11:26 AM, Mukul Gupta mukulnit...@gmail.comwrote: Hi Ivan, Thanks for the reply. Can you

Re: ElasticSearch not able to find documents which contains the searched text.

2014-01-31 Thread Mukul Gupta
Accept my apology. I forgot to post my mapping: {acqindex:{acqidx:{properties:{text:{type:string,index_analyzer:str_index_analyzer,search_analyzer:str_search_analyzer} I'll try my query with fields option and will get back to you. Just one question, why it is able to search for hotels then.

Re: ElasticSearch not able to find documents which contains the searched text.

2014-01-31 Thread Mukul Gupta
Using fields in query_string worked but still other problems which I meantioned earlier remains unsolved. On Fri, Jan 31, 2014 at 9:21 PM, Mukul Gupta mukulnit...@gmail.com wrote: Accept my apology. I forgot to post my mapping: {acqindex:{acqidx:{properties:{text:{type:string

Re: Custom Score Query not working in elasticsearch-0.90.3

2014-01-31 Thread Mukul Gupta
Binh, Thanks for the help. I fixed my scoring issue but loat my indexed time boosting. I tried using boosting at indexing using some other fields but results are not very satisfactory. I was using custom score so that I can get documents matching a search phrase with higher value of po field on

Re: Custom Score Query not working in elasticsearch-0.90.3

2014-01-31 Thread Mukul Gupta
Ivan, I tried using different field for script and boost. script seems to be working fine but boost is not working since I'm not able to see any factor from _boost in explain api. Can you please tell me how can I make use of boost ? On Fri, Jan 31, 2014 at 5:53 AM, Ivan Brusic i...@brusic.com

Re: Custom Score Query not working in elasticsearch-0.90.3

2014-01-31 Thread Mukul Gupta
reasons to switch from document time boosts. There is no reason to use both document boosts and custom scores. If you are already using a score function, just apply the boost at that level. Either way, you will not see the boost value directly. Ivan On Fri, Jan 31, 2014 at 8:13 AM, Mukul Gupta

Re: What will be the equivalent query of the following java api ?

2014-01-31 Thread Mukul Gupta
What is logger.info ? Can you please help me in writing the query dsl itself. I tried writing it but failed :( On Sat, Feb 1, 2014 at 1:15 AM, seallison sealli...@gmail.com wrote: With the Java API I'm pretty sure you can get the query DSL from the toString() on SearchRequestBuilder.

Re: What will be the equivalent query of the following java api ?

2014-01-31 Thread Mukul Gupta
Binh, how can I add explain:true in that one ? On Sat, Feb 1, 2014 at 1:47 AM, Binh Ly b...@hibalo.com wrote: Should be roughly like this: { query: { custom_score: { query: { query_string: { query: blah blah, fields: [ text^30,

Re: Need some help with Custom Score Query

2014-01-30 Thread Mukul Gupta
Binh, I'm not able to access po field. It's giving me error: Caused by: [Error: could not access: value; in class: org.elasticsearch.index.fielddata.ScriptDocValues$Empty] [Near : {... doc['po'].value }] I think that is the reason why my score is always same. Everytime, it is taking it as

Re: Need some help with Custom Score Query

2014-01-30 Thread Mukul Gupta
Binh, Can you take a look at this also. Thanks On Thu, Jan 30, 2014 at 1:47 PM, Mukul Gupta mukulnit...@gmail.com wrote: Binh, I'm not able to access po field. It's giving me error: Caused by: [Error: could not access: value; in class: org.elasticsearch.index.fielddata.ScriptDocValues

Re: Custom Score script parameter not working

2014-01-30 Thread Mukul Gupta
-driving-directions}}]}} This is really weird !!! On Thu, Jan 30, 2014 at 6:48 PM, Mukul Gupta mukulnit...@gmail.com wrote: I don't have any document for which po field is empty. I have checked my mongo collections. Also, earlier it was taking value 1 for all the documents that was the reason

Re: Custom Score script parameter not working

2014-01-30 Thread Mukul Gupta
I'm using elasticsearch-0.90.3. On Thu, Jan 30, 2014 at 7:14 PM, Binh Ly b...@hibalo.com wrote: That's strange. May I ask which version of ES are you using? Thanks. -- You received this message because you are subscribed to the Google Groups elasticsearch group. To unsubscribe from this

Re: How to configure elasticsearch to sort the scored documents on a field after score for documents is calculated ?

2014-01-29 Thread Mukul Gupta
at 10:47 PM, Mukul Gupta mukulnit...@gmail.comwrote: Hi Ivan, Actually my code is in java. I have seen those links but not able to implement it in my code. I'm using customscorequerybuilder for building my query. How can I use this sort in my code. Is there any java api for this ? Also, Can I do

Re: Need some help with Custom Score Query

2014-01-29 Thread Mukul Gupta
just an update: I'm using default similarity only. Ignore that customsimilarity line. On Wed, Jan 29, 2014 at 9:47 PM, Mukul Gupta mukulnit...@gmail.com wrote: But why am I getting exactly same score for two documents even though their po field hase different values. If I'm multiplying my

Re: Can anyone please explain the mapping in Elasticsearch ?

2014-01-29 Thread Mukul Gupta
Binh, I have a doubt in the above explanation. You mentioned that after suggestions_shingle: hotels in hosur becomes hotels, in, hosur, hotels in, hotels in hosur, in hosur but shouldn't be hotels , in, hosur should be removed since my min_shingle_size is 2 or is it like the original tokens will

Re: Can anyone please explain the mapping in Elasticsearch ?

2014-01-29 Thread Mukul Gupta
Binh, I have one more doubt regarding matching of index time tokens with query time tokens. Can you please tell me how elasticsearch does this type of matching ? Is it like it only matches the token or it also matches other information like start_offset, end_offset, type and position. ? Thanks

Re: How to configure elasticsearch to sort the scored documents on a field after score for documents is calculated ?

2014-01-21 Thread Mukul Gupta
Hi Ivan, Actually my code is in java. I have seen those links but not able to implement it in my code. I'm using customscorequerybuilder for building my query. How can I use this sort in my code. Is there any java api for this ? Also, Can I do this sort in my mapping itself ? Thanks On Wed,

Re: How to use ElasticSearch to implement Autocompleter ?

2014-01-17 Thread Mukul Gupta
But the problem still remains. The completion suggester will give you results only if there is an exact match but as previously mentioned there can be many types of queries which can be done by a user at travel website. Thanks On Fri, Jan 17, 2014 at 9:41 PM, joa joafeldm...@gmail.com wrote:

Re: How can we use elasticsearch custom similarity plugin in mapping ?

2014-01-16 Thread Mukul Gupta
Is there any java api available for function_score ? On Thu, Jan 16, 2014 at 5:16 PM, Luca Cavanna cavannal...@gmail.com wrote: Using the function_score you could use a script. Since 0.90.10 you can access term statistics from a script (

Re: How can we use elasticsearch custom similarity plugin in mapping ?

2014-01-16 Thread Mukul Gupta
are using the java API, you can find the usual query builder, called FunctionScoreQueryBuilder or even use the handy QueryBuilders static methods to create one. On Thu, Jan 16, 2014 at 1:43 PM, Mukul Gupta mukulnit...@gmail.comwrote: Is there any java api available for function_score

Re: How can we use elasticsearch custom similarity plugin in mapping ?

2014-01-16 Thread Mukul Gupta
PM, Mukul Gupta mukulnit...@gmail.comwrote: I tried using FunctionScoreQueryBuilders but there is no such thing available with me. Do I need to use any package for this ? On Thu, Jan 16, 2014 at 6:26 PM, Luca Cavanna cavannal...@gmail.comwrote: Not sure what you mean, the function score

Re: How to use ElasticSearch Custom Similarity provider classes ?

2014-01-16 Thread Mukul Gupta
Thanks a lot. It really solved my problem. On Thu, Jan 16, 2014 at 11:22 PM, Ivan Brusic i...@brusic.com wrote: I am assuming that you packaged the two Java files into a jar file and deploy it to the $ES_PATH lib directory. Elasticsearch will pick up any jar files in that directory.

Re: How can we use elasticsearch custom similarity plugin in mapping ?

2014-01-15 Thread Mukul Gupta
I have read about that module but the thing is I have to set idf to 1. Actually, I want common terms to give more weight in my search. Now, when I googled about it, it says overriding the default similarity class is the only way to achieve it. That's the reason why I'm looking for these plugins.

Re: How can we use elasticsearch custom similarity plugin in mapping ?

2014-01-15 Thread Mukul Gupta
need one class extending AbstractSimilarityProvider and another class with the actual similarity, which probably extends DefaultSimilarity. No need for a plugin, you just need the classes in the elasticsearch classpath at startup. Cheers, Ivan On Wed, Jan 15, 2014 at 9:17 AM, Mukul Gupta

Re: How can we use elasticsearch custom similarity plugin in mapping ?

2014-01-15 Thread Mukul Gupta
Hi Jörg, Let's say I want to modify my _score in such a way that it doesn't take into consideration idf while calculating score. How can I achieve this using function score ? Can you give me some example usage of function score which takes only tf into consideration. Thanks On Thu, Jan 16,