Re: How to display solr search results in Json format

2011-05-30 Thread bmdakshinamur...@gmail.com
Hi Romi,

When querying the Solr index, use 'wt=json' as part of your query string to
get the results back in json format.

On Tue, May 31, 2011 at 11:35 AM, Romi  wrote:

> I have indexed all my database data in solr, now I want to rum search on it
> and display results in JSON. what i need to do for it.
>
>
> -
> Thanks & Regards
> Romi
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/How-to-display-solr-search-results-in-Json-format-tp3004734p3004734.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Thanks and Regards,
DakshinaMurthy BM


Re: How to display solr search results in Json format

2011-05-31 Thread bmdakshinamur...@gmail.com
I am little confused about your question.

Incase you are looking to access the json object returned by solr, decode
the json object using a programming language of you choice. The document set
can be accessed using $json['response']['docs'](in PHP). This is an array of
hashes(associative arrays). Each element of this array is one document. You
can iterate through this document and display the results as doc[fieldname].

But if you are looking for the internals of the JSON response writer, you
can look at the JSONResponseWriter.java in package org.apache.solr.request.


On Tue, May 31, 2011 at 11:52 AM, Romi  wrote:

> Thanks for reply, But i want to know how Json does it internally, I mean
> how
> it display results as Field:value.
>
> -
> Thanks & Regards
> Romi
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/How-to-display-solr-search-results-in-Json-format-tp3004734p3004768.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Thanks and Regards,
DakshinaMurthy


Re: Edgengram

2011-05-31 Thread bmdakshinamur...@gmail.com
Can you specify the analyzer you are using for your queries?

May be you could use a KeywordAnalyzer for your queries so you don't end up
matching parts of your query.
http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/
This should help you.

On Tue, May 31, 2011 at 8:24 PM, Brian Lamb
wrote:

> In this particular case, I will be doing a solr search based on user
> preferences. So I will not be depending on the user to type "abcdefg". That
> will be automatically generated based on user selections.
>
> The contents of the field do not contain spaces and since I am created the
> search parameters, case isn't important either.
>
> Thanks,
>
> Brian Lamb
>
> On Tue, May 31, 2011 at 9:44 AM, Erick Erickson  >wrote:
>
> > That'll work for your case, although be aware that string types aren't
> > analyzed at all,
> > so case matters, as do spaces etc.
> >
> > What is the use-case here? If you explain it a bit there might be
> > better answers
> >
> > Best
> > Erick
> >
> > On Fri, May 27, 2011 at 9:17 AM, Brian Lamb
> >  wrote:
> > > For this, I ended up just changing it to string and using "abcdefg*" to
> > > match. That seems to work so far.
> > >
> > > Thanks,
> > >
> > > Brian Lamb
> > >
> > > On Wed, May 25, 2011 at 4:53 PM, Brian Lamb
> > > wrote:
> > >
> > >> Hi all,
> > >>
> > >> I'm running into some confusion with the way edgengram works. I have
> the
> > >> field set up as:
> > >>
> > >>  > >> positionIncrementGap="1000">
> > >>
> > >>  
> > >> > >> maxGramSize="100" side="front" />
> > >>
> > >> 
> > >>
> > >> I've also set up my own similarity class that returns 1 as the idf
> > score.
> > >> What I've found this does is if I match a string "abcdefg" against a
> > field
> > >> containing "abcdefghijklmnop", then the idf will score that as a 7:
> > >>
> > >> 7.0 = idf(myfield: a=51 ab=23 abc=2 abcd=2 abcde=2 abcdef=2 abcdefg=2)
> > >>
> > >> I get why that's happening, but is there a way to avoid that? Do I
> need
> > to
> > >> do a new field type to achieve the desired affect?
> > >>
> > >> Thanks,
> > >>
> > >> Brian Lamb
> > >>
> > >
> >
>



-- 
Thanks and Regards,
DakshinaMurthy BM


Re: problem: zooKeeper Integration with solr

2011-06-06 Thread bmdakshinamur...@gmail.com
Instead of integrating zookeeper, you could create shards over multiple
machines and specify the shards while you are querying solr.
Eg: http://localhost:8983/solr/select?shards=*:/,*
*:/*&indent=true&q=



On Mon, Jun 6, 2011 at 5:59 PM, Mohammad Shariq wrote:

> Hi folk,
> I am using solr to index around 100mn docs.
> now I am planning to move to cluster based solr, so that I can scale the
> indexing and searching process.
> since solrCloud is in development  stage, I am trying to index in shard
> based environment using zooKeeper.
>
> I followed the steps from
> http://wiki.apache.org/solr/ZooKeeperIntegrationthen also I am not
> able to do distributes search.
> Once I index the docs in one shard, not able to query from other shard and
> vice-versa, (using the query
>
> http://localhost:8180/solr/select/?q=itunes&version=2.2&start=0&rows=10&indent=on
> )
>
> I am running solr3.1 on ubuntu 10.10.
>
> please help me.
>
>
> --
> Thanks and Regards
> Mohammad Shariq
>



-- 
Thanks and Regards,
DakshinaMurthy BM