Re: Verify if solr reload core is successful or not

2014-10-20 Thread Prathik Puthran
What would be the response if the Core reload failed due to incorrect
configurations?

Thanks,
Prathik

On Mon, Oct 20, 2014 at 11:24 PM, Ramzi Alqrainy 
wrote:

> when you hit a request in the browser
> http://localhost:8983/solr/admin/cores?action=RELOAD&core=core0
>
> you will receive this response
>
> 
> 
>
>   0
>   1316
>
> 
>
> That means that every thing is fine
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Verify-if-solr-reload-core-is-successful-or-not-tp4164981p4164996.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Verify if solr reload core is successful or not

2014-10-20 Thread Prathik Puthran
Hi,

How do I verify if Solr core reload is successful or not? I use Solr 4.6.


To reload the core I send the below request:

http://hostname:7090/solr/admin/cores?action=RELOAD&core=core0&wt=json

Also is the above request synchronous ( I mean will the reload happen
before the response is recieved) or does it happen after we get the
response to the above request and we have to poll if the reload is
successful?

Thanks,
Prathik


Change the group.field name in the solr response

2014-05-23 Thread Prathik Puthran
Hi,

How can I change the field name in the "grouped" section of the solr
response.
I know for changing the field names in the response where solr returns
documents you can make a query with "fl" changed as
"fl=mapping1:fieldname1,mapping2:fieldname2"

How do I achieve the same thing for "grouping"?

For eg: If the solr returns the below response for "grouped" section when I
send the query with "group.field=fieldname"

"grouped": {"fieldname": {"matches": 1,"ngroups": 1,"groups": [{"groupValue
": "11254","doclist": {"numFound": 1,"start": 0,"docs": [{"store_id": 101,"
name": "tubelight ","fieldname": "14"}]}}]}},

I want solr to change the "fieldname" in the response to say some other
value I specify in the query.
How can I achieve this?

Thanks,
Prathik


Exception while unmarshalling response in SolrJ

2014-04-12 Thread Prathik Puthran
Hi,

I am using SolrJ client to send request to Solr. But instead of calling
Solr directly SolrJ communicates with my proxy server which in turn calls
Solr and gets the response in javabin format and returns back the response
to the client in the same format. The proxy server is written using play
framework and just sends request to Solr and returns the HTTP response to
client. Below is the exception I get in SolrJ client library when it tries
to unmarshall the javabin response. I'm using Solrj 4.7.0. How can I fix
this?

Exception Stack trace:















*Exception in thread "main"
org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrExceptionat
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:477)
at
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:199)
at
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:90)
at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:301)at
com.br.solr.Main.main(Main.java:20)Caused by:
java.lang.NullPointerExceptionat
org.apache.solr.common.util.JavaBinCodec.readExternString(JavaBinCodec.java:769)
at
org.apache.solr.common.util.JavaBinCodec.readVal(JavaBinCodec.java:192)
at
org.apache.solr.common.util.JavaBinCodec.unmarshal(JavaBinCodec.java:116)
at
org.apache.solr.client.solrj.impl.BinaryResponseParser.processResponse(BinaryResponseParser.java:43)
at
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:475)
... 4 more*


Re: Help in resolving the below retrieval issue

2013-09-12 Thread Prathik Puthran
Hi,

I am also seeing this issue when the search query is something like "how
are you?" (Quotes for clarity).
The query parser splits it to the below tokens:
+text:whats +text:your +text:raashee?

However when I remove the "?" from the search query "how are you" I get the
results.
Is "?" a special character? Should it be escaped as well?


On Wed, Sep 11, 2013 at 1:50 AM, Jack Krupansky wrote:

> Removing stray hyphens (embedded hyphens, like "CD-ROM", are okay) or
> escaping them with backslash looks like your best bests. There's no query
> parser option to disable the hyphen as an exlusion operator, although an
> upgrade to a "modern" Solr should fix the problem.
>
>
> -- Jack Krupansky
>
> -Original Message- From: Prathik Puthran
> Sent: Tuesday, September 10, 2013 4:13 PM
> To: solr-user@lucene.apache.org
>
> Subject: Re: Help in resolving the below retrieval issue
>
> I'm using Solr 3.4.
>
>
> This bug is causing the 2nd term i.e. "kumar" to be treated as an exclusion
> operator?
> Is it possible to configure the query parser to not treat the '-' as
> exclusion operator ?
> If not the only way is to remove the '-' from the query string?
>
> Thanks,
> Prathik
>
>
> On Tue, Sep 10, 2013 at 10:36 PM, Jack Krupansky 
> **wrote:
>
>  What release of Solr are you using?
>>
>> It appears that the hyphen is being treated as an exclusion operator even
>> though it is followed by a space. Solr 4.4 doesn't appear to do that, but
>> maybe earlier releases had a problem.
>>
>> In any case, be careful with leading hyphen in queries since it does mean
>> exclude documents that contain the following term.
>>
>> Or, just escape any leading hyphen with a backslash.
>>
>> -- Jack Krupansky
>>
>> -Original Message- From: Prathik Puthran
>> Sent: Tuesday, September 10, 2013 11:47 AM
>> To: d...@lucene.apache.org ; solr-user@lucene.apache.org
>> Subject: Re: Help in resolving the below retrieval issue
>>
>>
>> Thanks Erick for the response.
>> I tried to debug the query. Below is the response in the debug node
>>
>> Rahul - kumar> name="querystring">Rahul
>> - kumar+text:Rahul -text:kumar> name="parsedquery_toString">+text:Rahul -text:kumar> name="explain"/>LuceneQParser> name="filter_queries">Rahul - kumar> name="parsed_filter_queries"><str>+text:rahul -text:kumar
>>
>>
>>
>> Does it mean the query parser has parsed it to tokens "Rahul -" and
>> "kumar"?
>> Even if this was the case solr should be able to retrieve the documents
>> because I have indexed all the documents based on n-grams as well.
>>
>> Thanks,
>> Prathik
>>
>>
>> On Tue, Sep 10, 2013 at 7:09 PM, Erick Erickson > >*
>> *wrote:
>>
>>
>>  Try adding &debug=query to the url. What I think you'll find is that
>>
>>> you're running into
>>> a common issue, the difference between query parsing and analysis.
>>>
>>> when you submit anything with whitespace in it, the query parser will
>>> break it up
>>> _before_ it gets to the analysis part, you should see something in the
>>> debug
>>> portion of the query like
>>> field:rahul field:kumar and possibly even field:-
>>>
>>> These are searched as separate tokens. By specifying KeywordTokenizer, at
>>> index time you'll have exactly one token, rahul-kumar in the index which
>>> will not
>>> match any of the separated tokens
>>>
>>> Try escaping the spaces with backslash. You could also try quoting the
>>> input although
>>> that has some phrase implications.
>>>
>>> Do you really want this search to fail on just searching "rahul" though?
>>> Perhaps
>>> keywordTokenizer isn't best here, it depends upon your use-case...
>>>
>>> Best,
>>> Erick
>>>
>>>
>>> On Tue, Sep 10, 2013 at 8:10 AM, Prathik Puthran <
>>> prathik.puthra...@gmail.com> wrote:
>>>
>>>  Hi,
>>>
>>>>
>>>> I am facing the below issue where in Solr is not retrieving the indexed
>>>> word for some cases.
>>>>
>>>> This happens whenever the indexed word has string " - " (quotes for
>>>> clarity) as substring i.e word prefix followed by a space which is
>>>> followe

Re: Help in resolving the below retrieval issue

2013-09-10 Thread Prathik Puthran
I'm using Solr 3.4.


This bug is causing the 2nd term i.e. "kumar" to be treated as an exclusion
operator?
Is it possible to configure the query parser to not treat the '-' as
exclusion operator ?
If not the only way is to remove the '-' from the query string?

Thanks,
Prathik


On Tue, Sep 10, 2013 at 10:36 PM, Jack Krupansky wrote:

> What release of Solr are you using?
>
> It appears that the hyphen is being treated as an exclusion operator even
> though it is followed by a space. Solr 4.4 doesn't appear to do that, but
> maybe earlier releases had a problem.
>
> In any case, be careful with leading hyphen in queries since it does mean
> exclude documents that contain the following term.
>
> Or, just escape any leading hyphen with a backslash.
>
> -- Jack Krupansky
>
> -Original Message- From: Prathik Puthran
> Sent: Tuesday, September 10, 2013 11:47 AM
> To: d...@lucene.apache.org ; solr-user@lucene.apache.org
> Subject: Re: Help in resolving the below retrieval issue
>
>
> Thanks Erick for the response.
> I tried to debug the query. Below is the response in the debug node
>
> Rahul - kumarRahul
> - kumar+text:Rahul -text:kumar name="parsedquery_toString">+**text:Rahul -text:kumar name="explain"/>LuceneQParser name="filter_queries">**Rahul - kumar name="parsed_filter_queries"><**str>+text:rahul -text:kumar
>
>
> Does it mean the query parser has parsed it to tokens "Rahul -" and
> "kumar"?
> Even if this was the case solr should be able to retrieve the documents
> because I have indexed all the documents based on n-grams as well.
>
> Thanks,
> Prathik
>
>
> On Tue, Sep 10, 2013 at 7:09 PM, Erick Erickson *
> *wrote:
>
>  Try adding &debug=query to the url. What I think you'll find is that
>> you're running into
>> a common issue, the difference between query parsing and analysis.
>>
>> when you submit anything with whitespace in it, the query parser will
>> break it up
>> _before_ it gets to the analysis part, you should see something in the
>> debug
>> portion of the query like
>> field:rahul field:kumar and possibly even field:-
>>
>> These are searched as separate tokens. By specifying KeywordTokenizer, at
>> index time you'll have exactly one token, rahul-kumar in the index which
>> will not
>> match any of the separated tokens
>>
>> Try escaping the spaces with backslash. You could also try quoting the
>> input although
>> that has some phrase implications.
>>
>> Do you really want this search to fail on just searching "rahul" though?
>> Perhaps
>> keywordTokenizer isn't best here, it depends upon your use-case...
>>
>> Best,
>> Erick
>>
>>
>> On Tue, Sep 10, 2013 at 8:10 AM, Prathik Puthran <
>> prathik.puthra...@gmail.com> wrote:
>>
>>  Hi,
>>>
>>> I am facing the below issue where in Solr is not retrieving the indexed
>>> word for some cases.
>>>
>>> This happens whenever the indexed word has string " - " (quotes for
>>> clarity) as substring i.e word prefix followed by a space which is
>>> followed
>>> by '-' again followed by a space and followed by the rest of the word
>>> suffix.
>>> When I search with search query being the exact string Solr returns no
>>> results.
>>>
>>> Example:
>>> Indexed word --> "Rahul - kumar"  (quotes for clarity)
>>> If I search with the search query as below Solr gives no results
>>> Search query --> "Rahul - kumar"  (quotes for clarity)
>>>
>>> However the below search query returns the results
>>> Search query --> "Rahul kumar"
>>>
>>> Can you please let me know what I am doing wrong here and what should I
>>> do to ensure the first query i.e. "Rahul - kumar" returns the documents
>>> indexed using it.
>>>
>>> Below are the analyzers I am using:
>>> Index time analyzer components:
>>> 1) >> pattern="([^A-Za-z0-9 ])" replacement=""/>
>>>  2) 
>>>  3) 
>>>  4) >> generateWordParts="1"
>>> preserveOriginal="1"/>
>>>  5) >> maxGramSize="50" side="front"/>
>>>  6) >> maxGramSize="50" side="back"/>
>>>
>>> Query time analyzer components:
>>>  1) >> pattern="([^A-Za-z0-9 ])" replacement=""/>
>>>  2) 
>>>  3) 
>>>  4) >> generateWordParts="1"
>>> preserveOriginal="1"/>
>>>
>>>
>>> Can you please let me know how I can fix this?
>>>
>>> Thanks,
>>> Prathik
>>>
>>>
>>>
>>
>


Re: Help in resolving the below retrieval issue

2013-09-10 Thread Prathik Puthran
Thanks Erick for the response.
I tried to debug the query. Below is the response in the debug node

Rahul - kumarRahul
- kumar+text:Rahul -text:kumar+text:Rahul -text:kumarLuceneQParserRahul - kumar+text:rahul -text:kumar


Does it mean the query parser has parsed it to tokens "Rahul -" and "kumar"?
Even if this was the case solr should be able to retrieve the documents
because I have indexed all the documents based on n-grams as well.

Thanks,
Prathik


On Tue, Sep 10, 2013 at 7:09 PM, Erick Erickson wrote:

> Try adding &debug=query to the url. What I think you'll find is that
> you're running into
> a common issue, the difference between query parsing and analysis.
>
> when you submit anything with whitespace in it, the query parser will
> break it up
> _before_ it gets to the analysis part, you should see something in the
> debug
> portion of the query like
> field:rahul field:kumar and possibly even field:-
>
> These are searched as separate tokens. By specifying KeywordTokenizer, at
> index time you'll have exactly one token, rahul-kumar in the index which
> will not
> match any of the separated tokens
>
> Try escaping the spaces with backslash. You could also try quoting the
> input although
> that has some phrase implications.
>
> Do you really want this search to fail on just searching "rahul" though?
> Perhaps
> keywordTokenizer isn't best here, it depends upon your use-case...
>
> Best,
> Erick
>
>
> On Tue, Sep 10, 2013 at 8:10 AM, Prathik Puthran <
> prathik.puthra...@gmail.com> wrote:
>
>> Hi,
>>
>> I am facing the below issue where in Solr is not retrieving the indexed
>> word for some cases.
>>
>> This happens whenever the indexed word has string " - " (quotes for
>> clarity) as substring i.e word prefix followed by a space which is followed
>> by '-' again followed by a space and followed by the rest of the word
>> suffix.
>> When I search with search query being the exact string Solr returns no
>> results.
>>
>> Example:
>> Indexed word --> "Rahul - kumar"  (quotes for clarity)
>> If I search with the search query as below Solr gives no results
>> Search query --> "Rahul - kumar"  (quotes for clarity)
>>
>> However the below search query returns the results
>> Search query --> "Rahul kumar"
>>
>> Can you please let me know what I am doing wrong here and what should I
>> do to ensure the first query i.e. "Rahul - kumar" returns the documents
>> indexed using it.
>>
>> Below are the analyzers I am using:
>> Index time analyzer components:
>> 1) > pattern="([^A-Za-z0-9 ])" replacement=""/>
>>  2) 
>>  3) 
>>  4) > preserveOriginal="1"/>
>>  5) > maxGramSize="50" side="front"/>
>>  6) > maxGramSize="50" side="back"/>
>>
>> Query time analyzer components:
>>  1) > pattern="([^A-Za-z0-9 ])" replacement=""/>
>>  2) 
>>  3) 
>>  4) > preserveOriginal="1"/>
>>
>>
>> Can you please let me know how I can fix this?
>>
>> Thanks,
>> Prathik
>>
>>
>


Help in resolving the below retrieval issue

2013-09-10 Thread Prathik Puthran
Hi,

I am facing the below issue where in Solr is not retrieving the indexed
word for some cases.

This happens whenever the indexed word has string " - " (quotes for
clarity) as substring i.e word prefix followed by a space which is followed
by '-' again followed by a space and followed by the rest of the word
suffix.
When I search with search query being the exact string Solr returns no
results.

Example:
Indexed word --> "Rahul - kumar"  (quotes for clarity)
If I search with the search query as below Solr gives no results
Search query --> "Rahul - kumar"  (quotes for clarity)

However the below search query returns the results
Search query --> "Rahul kumar"

Can you please let me know what I am doing wrong here and what should I do
to ensure the first query i.e. "Rahul - kumar" returns the documents
indexed using it.

Below are the analyzers I am using:
Index time analyzer components:
1) 
 2) 
 3) 
 4) 
 5) 
 6) 

Query time analyzer components:
 1) 
 2) 
 3) 
 4) 


Can you please let me know how I can fix this?

Thanks,
Prathik


Spell check in SOLR

2013-07-02 Thread Prathik Puthran
Hi,

How can i configure SOLR to provide corrections for misspelled words. If
the query string is in dictionary SOLR should not return any suggestions.
But if the query string is not in dictionary SOLR should return all
possible corrected words in the dictionary which most likely could be the
query string?

Thanks,
Prathik


Getting the String which matched in the document as response

2013-06-20 Thread Prathik Puthran
Hi,

Is it possible to get the exact matched string in the index in the select
response of Solr.

For eg : If the search query is "Hello World" and the query parser is "OR"
solr would return all documents which matched both "Hello World", only
"Hello" or only "World".
Now I want to know which of the returned documents matched both "Hello
World" and which of them matched only "Hello" or "World".

Is it possible to get this info?

Thanks,
Prathik


Re: Returning both partial and complete match results in solr

2013-06-18 Thread Prathik Puthran
The 2nd query returns the complete matches as well. So I will have to
filter out the complete matches from the partial match results.


On Tue, Jun 18, 2013 at 3:31 PM, Upayavira  wrote:

> With two queries.
>
> I'm not sure there's another way to do it. Unless you were prepared to
> get coding, and implement another SearchComponent, but given that you
> can achieve it with two queries, that seems overkill to me.
>
> Upayavira
>
> On Tue, Jun 18, 2013, at 10:59 AM, Prathik Puthran wrote:
> > Hi,
> >
> > I wanted to know if it is possible to tweak solr to return the results of
> > both complete and partial query matches.
> >
> > For eg:
> > If the search query is "Brad Pitt" and if the query parser is "AND" Solr
> > returns all documents indexed against the term "Brad Pitt".
> > If the query parser is "OR" Solr returns all the documents indexed
> > against
> > the term "Brad Pitt", "Brad", "Pitt".
> >
> > I want to the Solr to return the data in a way such that all the results
> > matched by the "AND" parser (i.e. Complete match) should be in a seperate
> > key- value pair in JSON response.
> > i.e. "CompleteMatch :[doc1, doc2, doc3...]"
> > and all the partial matches which are not part of complete match should
> > be
> > a seperate key-value pair in JSON response i.e.
> > "PartialMatch : [doc4, doc5, doc6].
> >
> > How can I achieve this?
> >
> > Thanks,
> > Prathik
>


Returning both partial and complete match results in solr

2013-06-18 Thread Prathik Puthran
Hi,

I wanted to know if it is possible to tweak solr to return the results of
both complete and partial query matches.

For eg:
If the search query is "Brad Pitt" and if the query parser is "AND" Solr
returns all documents indexed against the term "Brad Pitt".
If the query parser is "OR" Solr returns all the documents indexed against
the term "Brad Pitt", "Brad", "Pitt".

I want to the Solr to return the data in a way such that all the results
matched by the "AND" parser (i.e. Complete match) should be in a seperate
key- value pair in JSON response.
i.e. "CompleteMatch :[doc1, doc2, doc3...]"
and all the partial matches which are not part of complete match should be
a seperate key-value pair in JSON response i.e.
"PartialMatch : [doc4, doc5, doc6].

How can I achieve this?

Thanks,
Prathik


Re: Filtered Query in Solr

2013-06-17 Thread Prathik Puthran
"MUSIC ALBUM" is the value of one of the field (asset_type) in the indexed
document.


On Mon, Jun 17, 2013 at 9:06 PM, Jack Krupansky wrote:

> What does the actual indexed data look like? Maybe "ALBUM" doesn't
> immediately follow "MUSIC", at least in that particular field. Or, maybe
> you added "MUSIC" and "ALBUM" as two separate values for that field and
> Solr then implicitly added the +100 position gap between them.
>
> -- Jack Krupansky
>
> -Original Message- From: Prathik Puthran
> Sent: Monday, June 17, 2013 11:20 AM
> To: solr-user@lucene.apache.org
> Subject: Re: Filtered Query in Solr
>
>
> Can you please explain why the 2nd one works?
>
>
>
>
> On Mon, Jun 17, 2013 at 8:49 PM, Prathik Puthran <
> prathik.puthra...@gmail.com> wrote:
>
>  The first one i.e. fq=asset_type:"MUSIC ALBUM" doesen't work.
>>
>> However the 2nd one works
>> fq=asset_type:(+MUSIC +ALBUM)
>>
>> Thanks for the response.
>>
>> Regards,
>> Prathik
>>
>>
>> On Mon, Jun 17, 2013 at 8:41 PM, Upayavira  wrote:
>>
>>  Your fq query is:
>>>
>>> fq=asset_type:MUSIC ALBUM
>>>
>>> This is actually interpreted as:
>>> fq=asset_type:MUSIC text:ALBUM
>>>
>>> You probably want:
>>> fq=asset_type:"MUSIC ALBUM"
>>> or
>>> fq=asset_type:(+MUSIC +ALBUM)
>>> or even:
>>> fq:{!term f=asset_type}MUSIC ALBUM
>>>
>>> Upayavira
>>>
>>> On Mon, Jun 17, 2013, at 03:57 PM, Prathik Puthran wrote:
>>> > Hi,
>>> >
>>> > I am making a select request to solr with with 'fq=asset_type:MUSIC
>>> > ALBUM'
>>> > (see query 1 below) as one of the GET parameter. This request does not
>>> > return any results. However when I send the select request with the
>>> > parameter 'asset_type=MUSIC ALBUM'(see query 2 below) I get the >
>>> results.
>>> >
>>> > Does the filtered query parser do anything special (like split based on
>>> > the
>>> > spaces) before processing the request? How do I avoid this from
>>> > happening?
>>> >
>>> > Query 1 -->
>>> >
>>> http://localhost:8080/solr/**assets/select?q=amitabh&fq=**
>>> asset_type%3AMUSIC%20ALBUM&wt=**json<http://localhost:8080/solr/assets/select?q=amitabh&fq=asset_type%3AMUSIC%20ALBUM&wt=json>
>>> >
>>> > Query 2 -->
>>> >
>>> http://localhost:8080/solr/**assets/select?wt=json&q=**
>>> amitabh&indent=true&sort=**release_year%20desc&asset_**
>>> type=MUSIC%20ALBUM<http://localhost:8080/solr/assets/select?wt=json&q=amitabh&indent=true&sort=release_year%20desc&asset_type=MUSIC%20ALBUM>
>>> >
>>> >
>>> > Thanks,
>>> > Prathik
>>>
>>>
>>
>>
>


Re: Filtered Query in Solr

2013-06-17 Thread Prathik Puthran
Can you please explain why the 2nd one works?




On Mon, Jun 17, 2013 at 8:49 PM, Prathik Puthran <
prathik.puthra...@gmail.com> wrote:

> The first one i.e. fq=asset_type:"MUSIC ALBUM" doesen't work.
>
> However the 2nd one works
> fq=asset_type:(+MUSIC +ALBUM)
>
> Thanks for the response.
>
> Regards,
> Prathik
>
>
> On Mon, Jun 17, 2013 at 8:41 PM, Upayavira  wrote:
>
>> Your fq query is:
>>
>> fq=asset_type:MUSIC ALBUM
>>
>> This is actually interpreted as:
>> fq=asset_type:MUSIC text:ALBUM
>>
>> You probably want:
>> fq=asset_type:"MUSIC ALBUM"
>> or
>> fq=asset_type:(+MUSIC +ALBUM)
>> or even:
>> fq:{!term f=asset_type}MUSIC ALBUM
>>
>> Upayavira
>>
>> On Mon, Jun 17, 2013, at 03:57 PM, Prathik Puthran wrote:
>> > Hi,
>> >
>> > I am making a select request to solr with with 'fq=asset_type:MUSIC
>> > ALBUM'
>> > (see query 1 below) as one of the GET parameter. This request does not
>> > return any results. However when I send the select request with the
>> > parameter 'asset_type=MUSIC ALBUM'(see query 2 below) I get the results.
>> >
>> > Does the filtered query parser do anything special (like split based on
>> > the
>> > spaces) before processing the request? How do I avoid this from
>> > happening?
>> >
>> > Query 1 -->
>> >
>> http://localhost:8080/solr/assets/select?q=amitabh&fq=asset_type%3AMUSIC%20ALBUM&wt=json
>> >
>> > Query 2 -->
>> >
>> http://localhost:8080/solr/assets/select?wt=json&q=amitabh&indent=true&sort=release_year%20desc&asset_type=MUSIC%20ALBUM
>> >
>> >
>> > Thanks,
>> > Prathik
>>
>
>


Re: Filtered Query in Solr

2013-06-17 Thread Prathik Puthran
The first one i.e. fq=asset_type:"MUSIC ALBUM" doesen't work.

However the 2nd one works
fq=asset_type:(+MUSIC +ALBUM)

Thanks for the response.

Regards,
Prathik


On Mon, Jun 17, 2013 at 8:41 PM, Upayavira  wrote:

> Your fq query is:
>
> fq=asset_type:MUSIC ALBUM
>
> This is actually interpreted as:
> fq=asset_type:MUSIC text:ALBUM
>
> You probably want:
> fq=asset_type:"MUSIC ALBUM"
> or
> fq=asset_type:(+MUSIC +ALBUM)
> or even:
> fq:{!term f=asset_type}MUSIC ALBUM
>
> Upayavira
>
> On Mon, Jun 17, 2013, at 03:57 PM, Prathik Puthran wrote:
> > Hi,
> >
> > I am making a select request to solr with with 'fq=asset_type:MUSIC
> > ALBUM'
> > (see query 1 below) as one of the GET parameter. This request does not
> > return any results. However when I send the select request with the
> > parameter 'asset_type=MUSIC ALBUM'(see query 2 below) I get the results.
> >
> > Does the filtered query parser do anything special (like split based on
> > the
> > spaces) before processing the request? How do I avoid this from
> > happening?
> >
> > Query 1 -->
> >
> http://localhost:8080/solr/assets/select?q=amitabh&fq=asset_type%3AMUSIC%20ALBUM&wt=json
> >
> > Query 2 -->
> >
> http://localhost:8080/solr/assets/select?wt=json&q=amitabh&indent=true&sort=release_year%20desc&asset_type=MUSIC%20ALBUM
> >
> >
> > Thanks,
> > Prathik
>


Filtered Query in Solr

2013-06-17 Thread Prathik Puthran
Hi,

I am making a select request to solr with with 'fq=asset_type:MUSIC ALBUM'
(see query 1 below) as one of the GET parameter. This request does not
return any results. However when I send the select request with the
parameter 'asset_type=MUSIC ALBUM'(see query 2 below) I get the results.

Does the filtered query parser do anything special (like split based on the
spaces) before processing the request? How do I avoid this from happening?

Query 1 -->
http://localhost:8080/solr/assets/select?q=amitabh&fq=asset_type%3AMUSIC%20ALBUM&wt=json

Query 2 -->
http://localhost:8080/solr/assets/select?wt=json&q=amitabh&indent=true&sort=release_year%20desc&asset_type=MUSIC%20ALBUM


Thanks,
Prathik


Re: Configuring lucene to suggest the indexed string for all the searches of the substring of the indexed string

2013-06-10 Thread Prathik Puthran
Our dictionary is has very less words. So it is more of a feature to the
user than a nuisance.

Thanks,
Prathik


On Mon, Jun 10, 2013 at 10:52 PM, Walter Underwood wrote:

> Why do you think that is useful? That will give terrible search results.
>
> Here are the first twenty words in /usr/share/dict/words that contain the
> substring "cat".
>
> abacate
> abdicate
> abdication
> abdicative
> abdicator
> aberuncator
> abjudicate
> abjudication
> acacatechin
> acacatechol
> acatalectic
> acatalepsia
> acatalepsy
> acataleptic
> acatallactic
> acatamathesia
> acataphasia
> acataposis
> acatastasia
> acatastatic
>
> wunder
>
> On Jun 9, 2013, at 10:56 PM, Prathik Puthran wrote:
>
> > Hi,
> >
> > @Walter
> > I'm trying to implement the below feature for the user.
> > User types in any "substring" of the strings in the dictionary (i.e. the
> > indexed string) .
> > SOLR Suggester should return all the strings in the dictionary which has
> > the input string as substring.
> >
> > Thanks,
> > Prathik
> >
> >
> >
> > On Fri, Jun 7, 2013 at 4:01 AM, Otis Gospodnetic <
> otis.gospodne...@gmail.com
> >> wrote:
> >
> >> Hi
> >>
> >> Ngrams *will* do this for you.
> >>
> >> Otis
> >> Solr & ElasticSearch Support
> >> http://sematext.com/
> >> On Jun 6, 2013 7:53 AM, "Prathik Puthran" 
> >> wrote:
> >>
> >>> Basically I want the Suggester to return for "Jason Bourne" as
> suggestion
> >>> for ".*Bour.*" regex.
> >>>
> >>> Thanks,
> >>> Prathik
> >>>
> >>>
> >>> On Thu, Jun 6, 2013 at 12:52 PM, Prathik Puthran <
> >>> prathik.puthra...@gmail.com> wrote:
> >>>
> >>>> This works even now i.e. when I search for "Jas" it suggests "Jason
> >>>> Bourne". What I want is when I search for "Bour" or "ason" (any
> >>> substring)
> >>>> it should suggest me "Jason Bourne" .
> >>>>
> >>>>
> >>>> On Thu, Jun 6, 2013 at 12:34 PM, Upayavira  wrote:
> >>>>
> >>>>> Can you se the ShingleFilterFactory? It is ngrams for terms rather
> >> than
> >>>>> characters. If you limited it to two term ngrams, when the user
> >> presses
> >>>>> space after their first word, you could do a suggested query against
> >>>>> your two term ngram field, which would suggest Jason Bourne, Jason
> >>>>> Statham, etc then you press space after "Jason".
> >>>>>
> >>>>> Upayavira
> >>>>>
> >>>>> On Thu, Jun 6, 2013, at 07:25 AM, Prathik Puthran wrote:
> >>>>>> My use case is I want to search for any substring of the indexed
> >>> string
> >>>>>> and
> >>>>>> the Suggester should suggest the indexed string. What can I do to
> >> make
> >>>>>> this
> >>>>>> work?
> >>>>>>
> >>>>>> Thanks,
> >>>>>> Prathik
> >>>>>>
> >>>>>>
> >>>>>> On Thu, Jun 6, 2013 at 2:05 AM, Mikhail Khludnev
> >>>>>>  >>>>>>> wrote:
> >>>>>>
> >>>>>>> Please excuse my misunderstanding, but I always wonder why this
> >>> index
> >>>>> time
> >>>>>>> processing is suggested usually. from my POV is the case for
> >>>>> query-time
> >>>>>>> processing i.e. PrefixQuery aka wildcard query Jason* .
> >>>>>>> Ultra-fast term retrieval also provided by TermsComponent.
> >>>>>>>
> >>>>>>>
> >>>>>>> On Wed, Jun 5, 2013 at 8:09 PM, Jack Krupansky <
> >>>>> j...@basetechnology.com
> >>>>>>>> wrote:
> >>>>>>>
> >>>>>>>> ngrams?
> >>>>>>>>
> >>>>>>>> See:
> >>>>>>>> http://lucene.apache.org/core/**4_3_0/analyzers-common/org/**
> >>>>>>>> apache/lucene/analysis/ngram/**NGramFilterFactory.html<
> >>>>>>>
> >>>>>
> >>>
> >>
> http://lucene.apache.org/core/4_3_0/analyzers-common/org/apache/lucene/analysis/ngram/NGramFilterFactory.html
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> -- Jack Krupansky
> >>>>>>>>
> >>>>>>>> -Original Message- From: Prathik Puthran
> >>>>>>>> Sent: Wednesday, June 05, 2013 11:59 AM
> >>>>>>>> To: solr-user@lucene.apache.org
> >>>>>>>> Subject: Configuring lucene to suggest the indexed string for
> >> all
> >>>>> the
> >>>>>>>> searches of the substring of the indexed string
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> Hi,
> >>>>>>>>
> >>>>>>>> Is it possible to configure solr to suggest the indexed string
> >> for
> >>>>> all
> >>>>>>> the
> >>>>>>>> searches of the substring of the string?
> >>>>>>>>
> >>>>>>>> Thanks,
> >>>>>>>> Prathik
> >>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> --
> >>>>>>> Sincerely yours
> >>>>>>> Mikhail Khludnev
> >>>>>>> Principal Engineer,
> >>>>>>> Grid Dynamics
> >>>>>>>
> >>>>>>> <http://www.griddynamics.com>
> >>>>>>> 
> >>>>>>>
> >>>>>
> >>>>
> >>>>
> >>>
> >>
>
> --
> Walter Underwood
> wun...@wunderwood.org
>
>
>
>


Re: Configuring lucene to suggest the indexed string for all the searches of the substring of the indexed string

2013-06-09 Thread Prathik Puthran
Hi,

@Walter
I'm trying to implement the below feature for the user.
User types in any "substring" of the strings in the dictionary (i.e. the
indexed string) .
SOLR Suggester should return all the strings in the dictionary which has
the input string as substring.

Thanks,
Prathik



On Fri, Jun 7, 2013 at 4:01 AM, Otis Gospodnetic  wrote:

> Hi
>
> Ngrams *will* do this for you.
>
> Otis
> Solr & ElasticSearch Support
> http://sematext.com/
> On Jun 6, 2013 7:53 AM, "Prathik Puthran" 
> wrote:
>
> > Basically I want the Suggester to return for "Jason Bourne" as suggestion
> > for ".*Bour.*" regex.
> >
> > Thanks,
> > Prathik
> >
> >
> > On Thu, Jun 6, 2013 at 12:52 PM, Prathik Puthran <
> > prathik.puthra...@gmail.com> wrote:
> >
> > > This works even now i.e. when I search for "Jas" it suggests "Jason
> > > Bourne". What I want is when I search for "Bour" or "ason" (any
> > substring)
> > > it should suggest me "Jason Bourne" .
> > >
> > >
> > > On Thu, Jun 6, 2013 at 12:34 PM, Upayavira  wrote:
> > >
> > >> Can you se the ShingleFilterFactory? It is ngrams for terms rather
> than
> > >> characters. If you limited it to two term ngrams, when the user
> presses
> > >> space after their first word, you could do a suggested query against
> > >> your two term ngram field, which would suggest Jason Bourne, Jason
> > >> Statham, etc then you press space after "Jason".
> > >>
> > >> Upayavira
> > >>
> > >> On Thu, Jun 6, 2013, at 07:25 AM, Prathik Puthran wrote:
> > >> > My use case is I want to search for any substring of the indexed
> > string
> > >> > and
> > >> > the Suggester should suggest the indexed string. What can I do to
> make
> > >> > this
> > >> > work?
> > >> >
> > >> > Thanks,
> > >> > Prathik
> > >> >
> > >> >
> > >> > On Thu, Jun 6, 2013 at 2:05 AM, Mikhail Khludnev
> > >> >  > >> > > wrote:
> > >> >
> > >> > > Please excuse my misunderstanding, but I always wonder why this
> > index
> > >> time
> > >> > > processing is suggested usually. from my POV is the case for
> > >> query-time
> > >> > > processing i.e. PrefixQuery aka wildcard query Jason* .
> > >> > > Ultra-fast term retrieval also provided by TermsComponent.
> > >> > >
> > >> > >
> > >> > > On Wed, Jun 5, 2013 at 8:09 PM, Jack Krupansky <
> > >> j...@basetechnology.com
> > >> > > >wrote:
> > >> > >
> > >> > > > ngrams?
> > >> > > >
> > >> > > > See:
> > >> > > > http://lucene.apache.org/core/**4_3_0/analyzers-common/org/**
> > >> > > > apache/lucene/analysis/ngram/**NGramFilterFactory.html<
> > >> > >
> > >>
> >
> http://lucene.apache.org/core/4_3_0/analyzers-common/org/apache/lucene/analysis/ngram/NGramFilterFactory.html
> > >> > > >
> > >> > > >
> > >> > > > -- Jack Krupansky
> > >> > > >
> > >> > > > -Original Message- From: Prathik Puthran
> > >> > > > Sent: Wednesday, June 05, 2013 11:59 AM
> > >> > > > To: solr-user@lucene.apache.org
> > >> > > > Subject: Configuring lucene to suggest the indexed string for
> all
> > >> the
> > >> > > > searches of the substring of the indexed string
> > >> > > >
> > >> > > >
> > >> > > > Hi,
> > >> > > >
> > >> > > > Is it possible to configure solr to suggest the indexed string
> for
> > >> all
> > >> > > the
> > >> > > > searches of the substring of the string?
> > >> > > >
> > >> > > > Thanks,
> > >> > > > Prathik
> > >> > > >
> > >> > >
> > >> > >
> > >> > >
> > >> > > --
> > >> > > Sincerely yours
> > >> > > Mikhail Khludnev
> > >> > > Principal Engineer,
> > >> > > Grid Dynamics
> > >> > >
> > >> > > <http://www.griddynamics.com>
> > >> > >  
> > >> > >
> > >>
> > >
> > >
> >
>


Re: Configuring lucene to suggest the indexed string for all the searches of the substring of the indexed string

2013-06-06 Thread Prathik Puthran
Basically I want the Suggester to return for "Jason Bourne" as suggestion
for ".*Bour.*" regex.

Thanks,
Prathik


On Thu, Jun 6, 2013 at 12:52 PM, Prathik Puthran <
prathik.puthra...@gmail.com> wrote:

> This works even now i.e. when I search for "Jas" it suggests "Jason
> Bourne". What I want is when I search for "Bour" or "ason" (any substring)
> it should suggest me "Jason Bourne" .
>
>
> On Thu, Jun 6, 2013 at 12:34 PM, Upayavira  wrote:
>
>> Can you se the ShingleFilterFactory? It is ngrams for terms rather than
>> characters. If you limited it to two term ngrams, when the user presses
>> space after their first word, you could do a suggested query against
>> your two term ngram field, which would suggest Jason Bourne, Jason
>> Statham, etc then you press space after "Jason".
>>
>> Upayavira
>>
>> On Thu, Jun 6, 2013, at 07:25 AM, Prathik Puthran wrote:
>> > My use case is I want to search for any substring of the indexed string
>> > and
>> > the Suggester should suggest the indexed string. What can I do to make
>> > this
>> > work?
>> >
>> > Thanks,
>> > Prathik
>> >
>> >
>> > On Thu, Jun 6, 2013 at 2:05 AM, Mikhail Khludnev
>> > > > > wrote:
>> >
>> > > Please excuse my misunderstanding, but I always wonder why this index
>> time
>> > > processing is suggested usually. from my POV is the case for
>> query-time
>> > > processing i.e. PrefixQuery aka wildcard query Jason* .
>> > > Ultra-fast term retrieval also provided by TermsComponent.
>> > >
>> > >
>> > > On Wed, Jun 5, 2013 at 8:09 PM, Jack Krupansky <
>> j...@basetechnology.com
>> > > >wrote:
>> > >
>> > > > ngrams?
>> > > >
>> > > > See:
>> > > > http://lucene.apache.org/core/**4_3_0/analyzers-common/org/**
>> > > > apache/lucene/analysis/ngram/**NGramFilterFactory.html<
>> > >
>> http://lucene.apache.org/core/4_3_0/analyzers-common/org/apache/lucene/analysis/ngram/NGramFilterFactory.html
>> > > >
>> > > >
>> > > > -- Jack Krupansky
>> > > >
>> > > > -Original Message- From: Prathik Puthran
>> > > > Sent: Wednesday, June 05, 2013 11:59 AM
>> > > > To: solr-user@lucene.apache.org
>> > > > Subject: Configuring lucene to suggest the indexed string for all
>> the
>> > > > searches of the substring of the indexed string
>> > > >
>> > > >
>> > > > Hi,
>> > > >
>> > > > Is it possible to configure solr to suggest the indexed string for
>> all
>> > > the
>> > > > searches of the substring of the string?
>> > > >
>> > > > Thanks,
>> > > > Prathik
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > Sincerely yours
>> > > Mikhail Khludnev
>> > > Principal Engineer,
>> > > Grid Dynamics
>> > >
>> > > <http://www.griddynamics.com>
>> > >  
>> > >
>>
>
>


Re: Configuring lucene to suggest the indexed string for all the searches of the substring of the indexed string

2013-06-06 Thread Prathik Puthran
This works even now i.e. when I search for "Jas" it suggests "Jason
Bourne". What I want is when I search for "Bour" or "ason" (any substring)
it should suggest me "Jason Bourne" .


On Thu, Jun 6, 2013 at 12:34 PM, Upayavira  wrote:

> Can you se the ShingleFilterFactory? It is ngrams for terms rather than
> characters. If you limited it to two term ngrams, when the user presses
> space after their first word, you could do a suggested query against
> your two term ngram field, which would suggest Jason Bourne, Jason
> Statham, etc then you press space after "Jason".
>
> Upayavira
>
> On Thu, Jun 6, 2013, at 07:25 AM, Prathik Puthran wrote:
> > My use case is I want to search for any substring of the indexed string
> > and
> > the Suggester should suggest the indexed string. What can I do to make
> > this
> > work?
> >
> > Thanks,
> > Prathik
> >
> >
> > On Thu, Jun 6, 2013 at 2:05 AM, Mikhail Khludnev
> >  > > wrote:
> >
> > > Please excuse my misunderstanding, but I always wonder why this index
> time
> > > processing is suggested usually. from my POV is the case for query-time
> > > processing i.e. PrefixQuery aka wildcard query Jason* .
> > > Ultra-fast term retrieval also provided by TermsComponent.
> > >
> > >
> > > On Wed, Jun 5, 2013 at 8:09 PM, Jack Krupansky <
> j...@basetechnology.com
> > > >wrote:
> > >
> > > > ngrams?
> > > >
> > > > See:
> > > > http://lucene.apache.org/core/**4_3_0/analyzers-common/org/**
> > > > apache/lucene/analysis/ngram/**NGramFilterFactory.html<
> > >
> http://lucene.apache.org/core/4_3_0/analyzers-common/org/apache/lucene/analysis/ngram/NGramFilterFactory.html
> > > >
> > > >
> > > > -- Jack Krupansky
> > > >
> > > > -Original Message- From: Prathik Puthran
> > > > Sent: Wednesday, June 05, 2013 11:59 AM
> > > > To: solr-user@lucene.apache.org
> > > > Subject: Configuring lucene to suggest the indexed string for all the
> > > > searches of the substring of the indexed string
> > > >
> > > >
> > > > Hi,
> > > >
> > > > Is it possible to configure solr to suggest the indexed string for
> all
> > > the
> > > > searches of the substring of the string?
> > > >
> > > > Thanks,
> > > > Prathik
> > > >
> > >
> > >
> > >
> > > --
> > > Sincerely yours
> > > Mikhail Khludnev
> > > Principal Engineer,
> > > Grid Dynamics
> > >
> > > <http://www.griddynamics.com>
> > >  
> > >
>


Re: Configuring lucene to suggest the indexed string for all the searches of the substring of the indexed string

2013-06-05 Thread Prathik Puthran
My use case is I want to search for any substring of the indexed string and
the Suggester should suggest the indexed string. What can I do to make this
work?

Thanks,
Prathik


On Thu, Jun 6, 2013 at 2:05 AM, Mikhail Khludnev  wrote:

> Please excuse my misunderstanding, but I always wonder why this index time
> processing is suggested usually. from my POV is the case for query-time
> processing i.e. PrefixQuery aka wildcard query Jason* .
> Ultra-fast term retrieval also provided by TermsComponent.
>
>
> On Wed, Jun 5, 2013 at 8:09 PM, Jack Krupansky  >wrote:
>
> > ngrams?
> >
> > See:
> > http://lucene.apache.org/core/**4_3_0/analyzers-common/org/**
> > apache/lucene/analysis/ngram/**NGramFilterFactory.html<
> http://lucene.apache.org/core/4_3_0/analyzers-common/org/apache/lucene/analysis/ngram/NGramFilterFactory.html
> >
> >
> > -- Jack Krupansky
> >
> > -Original Message- From: Prathik Puthran
> > Sent: Wednesday, June 05, 2013 11:59 AM
> > To: solr-user@lucene.apache.org
> > Subject: Configuring lucene to suggest the indexed string for all the
> > searches of the substring of the indexed string
> >
> >
> > Hi,
> >
> > Is it possible to configure solr to suggest the indexed string for all
> the
> > searches of the substring of the string?
> >
> > Thanks,
> > Prathik
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
> Principal Engineer,
> Grid Dynamics
>
> <http://www.griddynamics.com>
>  
>


Re: Configuring lucene to suggest the indexed string for all the searches of the substring of the indexed string

2013-06-05 Thread Prathik Puthran
ngrams won't work here. If I index all the ngrams of the string and when I
try to search for some string it would suggest all the ngrams as well.
Eg:
Dictionary contains the word "Jason Bourne" and you index all the ngrams of
the above word.
When I try to search for "Jason" solr suggests all the ngrams having the
word "Jason". Instead of just suggesting "Jason Bourne" lucene suggests
"Jason B", "Jason Bo", "Jason Bou", "Jason Bour", "Jason Bourn", "Jason
Bourne".

What should I do so that I only get "Jason Bourne" as the suggestion when
the uses searches any substring of this (Bour, Bourne etc).


On Wed, Jun 5, 2013 at 9:39 PM, Jack Krupansky wrote:

> ngrams?
>
> See:
> http://lucene.apache.org/core/**4_3_0/analyzers-common/org/**
> apache/lucene/analysis/ngram/**NGramFilterFactory.html<http://lucene.apache.org/core/4_3_0/analyzers-common/org/apache/lucene/analysis/ngram/NGramFilterFactory.html>
>
> -- Jack Krupansky
>
> -Original Message- From: Prathik Puthran
> Sent: Wednesday, June 05, 2013 11:59 AM
> To: solr-user@lucene.apache.org
> Subject: Configuring lucene to suggest the indexed string for all the
> searches of the substring of the indexed string
>
>
> Hi,
>
> Is it possible to configure solr to suggest the indexed string for all the
> searches of the substring of the string?
>
> Thanks,
> Prathik
>


Configuring lucene to suggest the indexed string for all the searches of the substring of the indexed string

2013-06-05 Thread Prathik Puthran
Hi,

Is it possible to configure solr to suggest the indexed string for all the
searches of the substring of the string?

Thanks,
Prathik


HostPort attribute of tag in solr.xml

2013-06-03 Thread Prathik Puthran
Hi,

I am not very sure what the hostPort attribute in  tag of solr.xml
mean. Can someone please let me know?

Thanks,
Prathik