RE: How to select one entity at a time?

2008-10-03 Thread con

Is there some other arguments that can be entered to this entity, so that we
can invoke it by its rowtype?

thanks 
con



con wrote:
> 
> Hi Burnell
> As we know in the real enterprise application the queries will be always
> complex than what I have posted here. That time I fear, this approach may
> not be sufficient. Especially when the query has to handle multiple
> conditions or joins or more complex operations like that.
> So I suppose if there is a way by which we can handle "both" just like
> "user", that will be a more stable approach. 
> 
> Thanks for your suggestion
> con
> 
> 
> Neville Burnell wrote:
>> 
>> Hi Con,
>> 
>> I'm not sure if you need the 'both' entity.
>> 
>> For example, perhaps the following query will work for you to retrieve
>> both?
>> 
>> http://localhost:8983/solr/select/?q=bob AND (rowtype:user OR
>> rowtype:manager)&version=2.2&start=0&rows=10&indent=on
>> 
>> 
>> 
>>> -----Original Message-
>>> From: con [mailto:[EMAIL PROTECTED]
>>> Sent: Wednesday, 1 October 2008 7:54 PM
>>> To: solr-user@lucene.apache.org
>>> Subject: RE: How to select one entity at a time?
>>> 
>>> 
>>> And finally its almost fine.. :jumping: :jumping: :jumping:
>>> Thanks Burnell.
>>> 
>>> My tables are in Oracle DB.
>>> So based on your suggestions the changes made are:
>>> 1) In the data-config.xml,
>>> >> query="select *
>>> from USER">
>>> 
>>> 
>>>>> query="select *
>>> from MANAGER">
>>> 
>>> 
>>> 
>>> 2) In schema.xml
>>> >> required="true" />
>>> 
>>> And when I call http://localhost:8983/solr/select/?q=(bob AND
>>> rowtype:user)&version=2.2&start=0&rows=10&indent=on
>>> only the user entity's values are returned and if I use manager, only
>>> the
>>> manager's values will be returned...
>>> It almost solved my issues.(95%).
>>> 
>>> But I am struck at one point.
>>> In the data-config.xml I have an entry like,
>>> 
>>> >> query="select *
>>> from USER , MANAGER where USER.userID = MANAGER.userID ">
>>> 
>>> 
>>> when i try to search like, http://localhost:8983/solr/select/?q=(150
>>> AND
>>> rowtype:both)&version=2.2&start=0&rows=10&indent=on
>>> will return zero responces.
>>> At the same time if I run
>>> http://localhost:8983/solr/select/?q=150&version=2.2&start=0&rows=10&in
>>> dent=on
>>> It will get values from both USER and MANAGER satisfying the condition.
>>> Is there any difference in applying transformer in such type of
>>> queries.
>>> 
>>> Once again,
>>> Thanks a lot:handshake:
>>> 
>>> Expecting reply
>>> con
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Neville Burnell wrote:
>>> >
>>> > BTW, You will also need to configure your schema.xml to index [and
>>> store?]
>>> > the rowtype attribute:
>>> >
>>> >>> > required="true" />
>>> >
>>> > Or alternatively change rowtype to be say rowtype_s to take advantage
>>> of
>>> > Solr's dynamic field definitions.
>>> >
>>> >> -Original Message-
>>> >> From: Neville Burnell [mailto:[EMAIL PROTECTED]
>>> >> Sent: Wednesday, 1 October 2008 6:06 PM
>>> >> To: solr-user@lucene.apache.org
>>> >> Subject: RE: How to select one entity at a time?
>>> >>
>>> >> Hi Con,
>>> >>
>>> >> what RDBMS are you using?
>>> >>
>>> >> This looks like a SQL syntax problem, perhaps the 'literal as
>>> column'
>>> >> is not right for your setup [while it works for my MS SQL Server].
>>> >>
>>> >> An alternative to supplying the "rowtype" attribute as a literal in
>>> the
>>> >> SQL clause is to use a Solr DIH Template Transformer
>>> >> http://wiki.apache.org/solr/DataImportHandler#transformer
>>> >>
>>> >> This should allow you to keep the working SQL. For exam

RE: How to select one entity at a time?

2008-10-02 Thread con

Hi Burnell
As we know in the real enterprise application the queries will be always
complex than what I have posted here. That time I fear, this approach may
not be sufficient. Especially when the query has to handle multiple
conditions or joins or more complex operations like that.
So I suppose if there is a way by which we can handle "both" just like
"user", that will be a more stable approach. 

Thanks for your suggestion
con


Neville Burnell wrote:
> 
> Hi Con,
> 
> I'm not sure if you need the 'both' entity.
> 
> For example, perhaps the following query will work for you to retrieve
> both?
> 
> http://localhost:8983/solr/select/?q=bob AND (rowtype:user OR
> rowtype:manager)&version=2.2&start=0&rows=10&indent=on
> 
> 
> 
>> -Original Message-
>> From: con [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, 1 October 2008 7:54 PM
>> To: solr-user@lucene.apache.org
>> Subject: RE: How to select one entity at a time?
>> 
>> 
>> And finally its almost fine.. :jumping: :jumping: :jumping:
>> Thanks Burnell.
>> 
>> My tables are in Oracle DB.
>> So based on your suggestions the changes made are:
>> 1) In the data-config.xml,
>> > query="select *
>> from USER">
>> 
>> 
>>> query="select *
>> from MANAGER">
>> 
>> 
>> 
>> 2) In schema.xml
>> > required="true" />
>> 
>> And when I call http://localhost:8983/solr/select/?q=(bob AND
>> rowtype:user)&version=2.2&start=0&rows=10&indent=on
>> only the user entity's values are returned and if I use manager, only
>> the
>> manager's values will be returned...
>> It almost solved my issues.(95%).
>> 
>> But I am struck at one point.
>> In the data-config.xml I have an entry like,
>> 
>> > query="select *
>> from USER , MANAGER where USER.userID = MANAGER.userID ">
>> 
>> 
>> when i try to search like, http://localhost:8983/solr/select/?q=(150
>> AND
>> rowtype:both)&version=2.2&start=0&rows=10&indent=on
>> will return zero responces.
>> At the same time if I run
>> http://localhost:8983/solr/select/?q=150&version=2.2&start=0&rows=10&in
>> dent=on
>> It will get values from both USER and MANAGER satisfying the condition.
>> Is there any difference in applying transformer in such type of
>> queries.
>> 
>> Once again,
>> Thanks a lot:handshake:
>> 
>> Expecting reply
>> con
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Neville Burnell wrote:
>> >
>> > BTW, You will also need to configure your schema.xml to index [and
>> store?]
>> > the rowtype attribute:
>> >
>> >> > required="true" />
>> >
>> > Or alternatively change rowtype to be say rowtype_s to take advantage
>> of
>> > Solr's dynamic field definitions.
>> >
>> >> -Original Message-
>> >> From: Neville Burnell [mailto:[EMAIL PROTECTED]
>> >> Sent: Wednesday, 1 October 2008 6:06 PM
>> >> To: solr-user@lucene.apache.org
>> >> Subject: RE: How to select one entity at a time?
>> >>
>> >> Hi Con,
>> >>
>> >> what RDBMS are you using?
>> >>
>> >> This looks like a SQL syntax problem, perhaps the 'literal as
>> column'
>> >> is not right for your setup [while it works for my MS SQL Server].
>> >>
>> >> An alternative to supplying the "rowtype" attribute as a literal in
>> the
>> >> SQL clause is to use a Solr DIH Template Transformer
>> >> http://wiki.apache.org/solr/DataImportHandler#transformer
>> >>
>> >> This should allow you to keep the working SQL. For example
>> >>
>> >> 
>> >>   
>> >> 
>> >>
>> >>
>> >> > -Original Message-
>> >> > From: con [mailto:[EMAIL PROTECTED]
>> >> > Sent: Wednesday, 1 October 2008 5:48 PM
>> >> > To: solr-user@lucene.apache.org
>> >> > Subject: RE: How to select one entity at a time?
>> >> >
>> >> >
>> >> > That is exactly what my problem is.:handshake:
>> >> > Thanks for you reply.
>> >> >
>> &g

RE: How to select one entity at a time?

2008-10-01 Thread Neville Burnell
Hi Con,

I'm not sure if you need the 'both' entity.

For example, perhaps the following query will work for you to retrieve both?

http://localhost:8983/solr/select/?q=bob AND (rowtype:user OR 
rowtype:manager)&version=2.2&start=0&rows=10&indent=on



> -Original Message-
> From: con [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 1 October 2008 7:54 PM
> To: solr-user@lucene.apache.org
> Subject: RE: How to select one entity at a time?
> 
> 
> And finally its almost fine.. :jumping: :jumping: :jumping:
> Thanks Burnell.
> 
> My tables are in Oracle DB.
> So based on your suggestions the changes made are:
> 1) In the data-config.xml,
>  query="select *
> from USER">
> 
> 
> query="select *
> from MANAGER">
> 
> 
> 
> 2) In schema.xml
>  required="true" />
> 
> And when I call http://localhost:8983/solr/select/?q=(bob AND
> rowtype:user)&version=2.2&start=0&rows=10&indent=on
> only the user entity's values are returned and if I use manager, only
> the
> manager's values will be returned...
> It almost solved my issues.(95%).
> 
> But I am struck at one point.
> In the data-config.xml I have an entry like,
> 
>  query="select *
> from USER , MANAGER where USER.userID = MANAGER.userID ">
> 
> 
> when i try to search like, http://localhost:8983/solr/select/?q=(150
> AND
> rowtype:both)&version=2.2&start=0&rows=10&indent=on
> will return zero responces.
> At the same time if I run
> http://localhost:8983/solr/select/?q=150&version=2.2&start=0&rows=10&in
> dent=on
> It will get values from both USER and MANAGER satisfying the condition.
> Is there any difference in applying transformer in such type of
> queries.
> 
> Once again,
> Thanks a lot:handshake:
> 
> Expecting reply
> con
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Neville Burnell wrote:
> >
> > BTW, You will also need to configure your schema.xml to index [and
> store?]
> > the rowtype attribute:
> >
> > > required="true" />
> >
> > Or alternatively change rowtype to be say rowtype_s to take advantage
> of
> > Solr's dynamic field definitions.
> >
> >> -Original Message-
> >> From: Neville Burnell [mailto:[EMAIL PROTECTED]
> >> Sent: Wednesday, 1 October 2008 6:06 PM
> >> To: solr-user@lucene.apache.org
> >> Subject: RE: How to select one entity at a time?
> >>
> >> Hi Con,
> >>
> >> what RDBMS are you using?
> >>
> >> This looks like a SQL syntax problem, perhaps the 'literal as
> column'
> >> is not right for your setup [while it works for my MS SQL Server].
> >>
> >> An alternative to supplying the "rowtype" attribute as a literal in
> the
> >> SQL clause is to use a Solr DIH Template Transformer
> >> http://wiki.apache.org/solr/DataImportHandler#transformer
> >>
> >> This should allow you to keep the working SQL. For example
> >>
> >> 
> >>
> >> 
> >>
> >>
> >> > -Original Message-
> >> > From: con [mailto:[EMAIL PROTECTED]
> >> > Sent: Wednesday, 1 October 2008 5:48 PM
> >> > To: solr-user@lucene.apache.org
> >> > Subject: RE: How to select one entity at a time?
> >> >
> >> >
> >> > That is exactly what my problem is.:handshake:
> >> > Thanks for you reply.
> >> >
> >> > But I tried your suggestion:
> >> > Updated the data-config.xml as;
> >> >
> >> > 
> >> > 
> >> >
> >> > But when I perform the full import itself, it is throwing
> exception,
> >> >
> >> >SEVERE: Exception while processing: user document :
> >> > SolrInputDocumnt[{}]
> >> > org.apache.solr.handler.dataimport.DataImportHandlerException:
> >> > Unable to
> >> > execute
> >> > query: select 'user' as rowtype,* from USER Processing
> Document #
> >> 1
> >> > ...
> >> > So, as expected, when I go to search it is giving- undefined field
> >> > rowtype-
> >> > error.!!!
> >> > Do I need to update any other files or fields?
> >> >
> >> > I am happy that it worked for you...:jumping::jumping:
> >> > Looking forward for your reply
> >&g

Re: How to select one entity at a time?

2008-10-01 Thread con

This will be fine if there is only one "both" entity. It is quite common that
there will be more than one "both" like queries. That is queries that
connect more than one table. In such a case how can I distinguish one
particular entity at a time. 

> Solr search is based on documents and not on entities. Better not to
> confuse
them.
Ok. I am actually saying from the data-config.xml perspective.:-)


Shalin Shekhar Mangar wrote:
> 
> 
> 
> On Wed, Oct 1, 2008 at 3:24 PM, con <[EMAIL PROTECTED]> wrote:
> 
>>
>> And finally its almost fine.. :jumping: :jumping: :jumping:
>> Thanks Burnell.
>>
>> My tables are in Oracle DB.
>> So based on your suggestions the changes made are:
>> 1) In the data-config.xml,
>> 
>>
>>
>>> query="select
>> *
>> from MANAGER">
>> 
>>
>>
>> 2) In schema.xml
>> > required="true" />
>>
>> And when I call
>> http://localhost:8983/solr/select/?q=(bob<http://localhost:8983/solr/select/?q=%28bob>AND
>> rowtype:user)&version=2.2&start=0&rows=10&indent=on
>> only the user entity's values are returned and if I use manager, only the
>> manager's values will be returned...
>> It almost solved my issues.(95%).
>>
>> But I am struck at one point.
>> In the data-config.xml I have an entry like,
>>
>>
>>
>>
>> when i try to search like,
>> http://localhost:8983/solr/select/?q=(150<http://localhost:8983/solr/select/?q=%28150>AND
>> rowtype:both)&version=2.2&start=0&rows=10&indent=on
>> will return zero responces.
>> At the same time if I run
>>
>> http://localhost:8983/solr/select/?q=150&version=2.2&start=0&rows=10&indent=on
>> It will get values from both USER and MANAGER satisfying the condition.
>> Is there any difference in applying transformer in such type of queries.
>>
>> Once again,
>> Thanks a lot:handshake:
>>
>> Expecting reply
>> con
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Neville Burnell wrote:
>> >
>> > BTW, You will also need to configure your schema.xml to index [and
>> store?]
>> > the rowtype attribute:
>> >
>> >> > required="true" />
>> >
>> > Or alternatively change rowtype to be say rowtype_s to take advantage
>> of
>> > Solr's dynamic field definitions.
>> >
>> >> -Original Message-
>> >> From: Neville Burnell [mailto:[EMAIL PROTECTED]
>> >> Sent: Wednesday, 1 October 2008 6:06 PM
>> >> To: solr-user@lucene.apache.org
>> >> Subject: RE: How to select one entity at a time?
>> >>
>> >> Hi Con,
>> >>
>> >> what RDBMS are you using?
>> >>
>> >> This looks like a SQL syntax problem, perhaps the 'literal as column'
>> >> is not right for your setup [while it works for my MS SQL Server].
>> >>
>> >> An alternative to supplying the "rowtype" attribute as a literal in
>> the
>> >> SQL clause is to use a Solr DIH Template Transformer
>> >> http://wiki.apache.org/solr/DataImportHandler#transformer
>> >>
>> >> This should allow you to keep the working SQL. For example
>> >>
>> >> 
>> >>  
>> >> 
>> >>
>> >>
>> >> > -Original Message-
>> >> > From: con [mailto:[EMAIL PROTECTED]
>> >> > Sent: Wednesday, 1 October 2008 5:48 PM
>> >> > To: solr-user@lucene.apache.org
>> >> > Subject: RE: How to select one entity at a time?
>> >> >
>> >> >
>> >> > That is exactly what my problem is.:handshake:
>> >> > Thanks for you reply.
>> >> >
>> >> > But I tried your suggestion:
>> >> > Updated the data-config.xml as;
>> >> >
>> >> > 
>> >> > 
>> >> >
>> >> > But when I perform the full import itself, it is throwing exception,
>> >> >
>> >> >SEVERE: Exception while processing: user document :
>> >> > SolrInputDocumnt[{}]
>> >> > org.apache.solr.handler.dataimport.DataImportHandlerException:
>> >> > Unable to
>> >> > execute
>> >> > query: select 'user' as 

Re: How to select one entity at a time?

2008-10-01 Thread Shalin Shekhar Mangar
I guess the "both" entity is an inner entity. Only the root level entities
contribute solr documents, the inner ones provide additional fields. So
don't specify the rowtype and you will get both users and managers.

Solr search is based on documents and not on entities. Better not to confuse
them.

On Wed, Oct 1, 2008 at 3:24 PM, con <[EMAIL PROTECTED]> wrote:

>
> And finally its almost fine.. :jumping: :jumping: :jumping:
> Thanks Burnell.
>
> My tables are in Oracle DB.
> So based on your suggestions the changes made are:
> 1) In the data-config.xml,
> 
>
>
>
> 
>
>
> 2) In schema.xml
>  required="true" />
>
> And when I call 
> http://localhost:8983/solr/select/?q=(bob<http://localhost:8983/solr/select/?q=%28bob>AND
> rowtype:user)&version=2.2&start=0&rows=10&indent=on
> only the user entity's values are returned and if I use manager, only the
> manager's values will be returned...
> It almost solved my issues.(95%).
>
> But I am struck at one point.
> In the data-config.xml I have an entry like,
>
>
>
>
> when i try to search like, 
> http://localhost:8983/solr/select/?q=(150<http://localhost:8983/solr/select/?q=%28150>AND
> rowtype:both)&version=2.2&start=0&rows=10&indent=on
> will return zero responces.
> At the same time if I run
>
> http://localhost:8983/solr/select/?q=150&version=2.2&start=0&rows=10&indent=on
> It will get values from both USER and MANAGER satisfying the condition.
> Is there any difference in applying transformer in such type of queries.
>
> Once again,
> Thanks a lot:handshake:
>
> Expecting reply
> con
>
>
>
>
>
>
>
>
>
> Neville Burnell wrote:
> >
> > BTW, You will also need to configure your schema.xml to index [and
> store?]
> > the rowtype attribute:
> >
> > > required="true" />
> >
> > Or alternatively change rowtype to be say rowtype_s to take advantage of
> > Solr's dynamic field definitions.
> >
> >> -Original Message-
> >> From: Neville Burnell [mailto:[EMAIL PROTECTED]
> >> Sent: Wednesday, 1 October 2008 6:06 PM
> >> To: solr-user@lucene.apache.org
> >> Subject: RE: How to select one entity at a time?
> >>
> >> Hi Con,
> >>
> >> what RDBMS are you using?
> >>
> >> This looks like a SQL syntax problem, perhaps the 'literal as column'
> >> is not right for your setup [while it works for my MS SQL Server].
> >>
> >> An alternative to supplying the "rowtype" attribute as a literal in the
> >> SQL clause is to use a Solr DIH Template Transformer
> >> http://wiki.apache.org/solr/DataImportHandler#transformer
> >>
> >> This should allow you to keep the working SQL. For example
> >>
> >> 
> >>  
> >> 
> >>
> >>
> >> > -Original Message-
> >> > From: con [mailto:[EMAIL PROTECTED]
> >> > Sent: Wednesday, 1 October 2008 5:48 PM
> >> > To: solr-user@lucene.apache.org
> >> > Subject: RE: How to select one entity at a time?
> >> >
> >> >
> >> > That is exactly what my problem is.:handshake:
> >> > Thanks for you reply.
> >> >
> >> > But I tried your suggestion:
> >> > Updated the data-config.xml as;
> >> >
> >> > 
> >> > 
> >> >
> >> > But when I perform the full import itself, it is throwing exception,
> >> >
> >> >SEVERE: Exception while processing: user document :
> >> > SolrInputDocumnt[{}]
> >> > org.apache.solr.handler.dataimport.DataImportHandlerException:
> >> > Unable to
> >> > execute
> >> > query: select 'user' as rowtype,* from USER Processing Document #
> >> 1
> >> > ...
> >> > So, as expected, when I go to search it is giving- undefined field
> >> > rowtype-
> >> > error.!!!
> >> > Do I need to update any other files or fields?
> >> >
> >> > I am happy that it worked for you...:jumping::jumping:
> >> > Looking forward for your reply
> >> > Thanks
> >> > con
> >> >
> >> >
> >> >
> >> >
> >> > Neville Burnell wrote:
> >> > >
> >> > > Hi,
> >> > >
> >> > >>

RE: How to select one entity at a time?

2008-10-01 Thread con

And finally its almost fine.. :jumping: :jumping: :jumping:
Thanks Burnell.

My tables are in Oracle DB.
So based on your suggestions the changes made are:
1) In the data-config.xml,
 
 


 


2) In schema.xml
 

And when I call http://localhost:8983/solr/select/?q=(bob AND
rowtype:user)&version=2.2&start=0&rows=10&indent=on
only the user entity's values are returned and if I use manager, only the
manager's values will be returned...
It almost solved my issues.(95%).

But I am struck at one point.
In the data-config.xml I have an entry like,

 
 

when i try to search like, http://localhost:8983/solr/select/?q=(150 AND
rowtype:both)&version=2.2&start=0&rows=10&indent=on
will return zero responces. 
At the same time if I run
http://localhost:8983/solr/select/?q=150&version=2.2&start=0&rows=10&indent=on 
It will get values from both USER and MANAGER satisfying the condition.
Is there any difference in applying transformer in such type of queries.

Once again,
Thanks a lot:handshake:

Expecting reply
con









Neville Burnell wrote:
> 
> BTW, You will also need to configure your schema.xml to index [and store?]
> the rowtype attribute:
> 
> required="true" />
> 
> Or alternatively change rowtype to be say rowtype_s to take advantage of
> Solr's dynamic field definitions.
> 
>> -Original Message-
>> From: Neville Burnell [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, 1 October 2008 6:06 PM
>> To: solr-user@lucene.apache.org
>> Subject: RE: How to select one entity at a time?
>> 
>> Hi Con,
>> 
>> what RDBMS are you using?
>> 
>> This looks like a SQL syntax problem, perhaps the 'literal as column'
>> is not right for your setup [while it works for my MS SQL Server].
>> 
>> An alternative to supplying the "rowtype" attribute as a literal in the
>> SQL clause is to use a Solr DIH Template Transformer
>> http://wiki.apache.org/solr/DataImportHandler#transformer
>> 
>> This should allow you to keep the working SQL. For example
>> 
>> 
>>  
>> 
>> 
>> 
>> > -Original Message-
>> > From: con [mailto:[EMAIL PROTECTED]
>> > Sent: Wednesday, 1 October 2008 5:48 PM
>> > To: solr-user@lucene.apache.org
>> > Subject: RE: How to select one entity at a time?
>> >
>> >
>> > That is exactly what my problem is.:handshake:
>> > Thanks for you reply.
>> >
>> > But I tried your suggestion:
>> > Updated the data-config.xml as;
>> >
>> > 
>> > 
>> >
>> > But when I perform the full import itself, it is throwing exception,
>> >
>> >SEVERE: Exception while processing: user document :
>> > SolrInputDocumnt[{}]
>> > org.apache.solr.handler.dataimport.DataImportHandlerException:
>> > Unable to
>> > execute
>> > query: select 'user' as rowtype,* from USER Processing Document #
>> 1
>> > ...
>> > So, as expected, when I go to search it is giving- undefined field
>> > rowtype-
>> > error.!!!
>> > Do I need to update any other files or fields?
>> >
>> > I am happy that it worked for you...:jumping::jumping:
>> > Looking forward for your reply
>> > Thanks
>> > con
>> >
>> >
>> >
>> >
>> > Neville Burnell wrote:
>> > >
>> > > Hi,
>> > >
>> > >> But while performing a search, if I want to search only the data
>> > from
>> > >> USER table, how can I acheive it.
>> > >
>> > > In my app+solr index, we solved this problem by "tagging" entities
>> > with a
>> > > "rowtype" attribute, something like this:
>> > >
>> > > 
>> > > 
>> > >
>> > > Then your 'users' only query becomes something like:
>> > >
>> > > http://localhost:8983/solr/select/?q=(bob AND
>> > > rowtype:user)&version=2.2&start=0&rows=10&indent=on&wt=json
>> > >
>> > > Hope this helps
>> > >
>> > >
>> > >
>> > >> -Original Message-
>> > >> From: con [mailto:[EMAIL PROTECTED]
>> > >> Sent: Wednesday, 1 October 2008 4:54 PM
>> > >> To: solr-user@lucene.apache.org
>> > >> Subject: Re: How to select one entity at a time?
>> > >>
>> 

RE: How to select one entity at a time?

2008-10-01 Thread Neville Burnell
BTW, You will also need to configure your schema.xml to index [and store?] the 
rowtype attribute:

   

Or alternatively change rowtype to be say rowtype_s to take advantage of Solr's 
dynamic field definitions.

> -Original Message-
> From: Neville Burnell [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 1 October 2008 6:06 PM
> To: solr-user@lucene.apache.org
> Subject: RE: How to select one entity at a time?
> 
> Hi Con,
> 
> what RDBMS are you using?
> 
> This looks like a SQL syntax problem, perhaps the 'literal as column'
> is not right for your setup [while it works for my MS SQL Server].
> 
> An alternative to supplying the "rowtype" attribute as a literal in the
> SQL clause is to use a Solr DIH Template Transformer
> http://wiki.apache.org/solr/DataImportHandler#transformer
> 
> This should allow you to keep the working SQL. For example
> 
> 
>   
> 
> 
> 
> > -Original Message-
> > From: con [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, 1 October 2008 5:48 PM
> > To: solr-user@lucene.apache.org
> > Subject: RE: How to select one entity at a time?
> >
> >
> > That is exactly what my problem is.:handshake:
> > Thanks for you reply.
> >
> > But I tried your suggestion:
> > Updated the data-config.xml as;
> >
> > 
> > 
> >
> > But when I perform the full import itself, it is throwing exception,
> >
> >SEVERE: Exception while processing: user document :
> > SolrInputDocumnt[{}]
> > org.apache.solr.handler.dataimport.DataImportHandlerException:
> > Unable to
> > execute
> > query: select 'user' as rowtype,* from USER Processing Document #
> 1
> > ...
> > So, as expected, when I go to search it is giving- undefined field
> > rowtype-
> > error.!!!
> > Do I need to update any other files or fields?
> >
> > I am happy that it worked for you...:jumping::jumping:
> > Looking forward for your reply
> > Thanks
> > con
> >
> >
> >
> >
> > Neville Burnell wrote:
> > >
> > > Hi,
> > >
> > >> But while performing a search, if I want to search only the data
> > from
> > >> USER table, how can I acheive it.
> > >
> > > In my app+solr index, we solved this problem by "tagging" entities
> > with a
> > > "rowtype" attribute, something like this:
> > >
> > > 
> > > 
> > >
> > > Then your 'users' only query becomes something like:
> > >
> > > http://localhost:8983/solr/select/?q=(bob AND
> > > rowtype:user)&version=2.2&start=0&rows=10&indent=on&wt=json
> > >
> > > Hope this helps
> > >
> > >
> > >
> > >> -Original Message-
> > >> From: con [mailto:[EMAIL PROTECTED]
> > >> Sent: Wednesday, 1 October 2008 4:54 PM
> > >> To: solr-user@lucene.apache.org
> > >> Subject: Re: How to select one entity at a time?
> > >>
> > >>
> > >> Of course I agree.
> > >> But while performing a search, if I want to search only the data
> > from
> > >> USER
> > >> table, how can I acheive it.
> > >>
> > >> Suppose I have a user name bob in both USER and MANAGER tables. So
> > when
> > >> I
> > >> perform http://localhost:8983/solr/dataimport?command=full-import
> ,
> > all
> > >> the
> > >> USER and MANAGER values will get indexed.
> > >> And when i do a search like,
> > >>
> >
> http://localhost:8983/solr/select/?q=bob&version=2.2&start=0&rows=10&in
> > >> dent=on&wt=json
> > >> it will return all the values indexed from both USER and MANAGER
> > table.
> > >> But I want only the data indexed from either USER table or MANAGER
> > >> table at
> > >> a time based on the end user's choice. How can I achieve it.
> > >>
> > >> Thanks for your reply
> > >> con
> > >>
> > >>
> > >> Noble Paul നോബിള്‍ नोब्ळ् wrote:
> > >> >
> > >> > The entity and the select query has no relationship
> > >> > The entity comes into picture when you do a dataimport
> > >> >
> > >> > eg:
> > >> > http://localhost:8983/solr/dataimport?command=full-
> > import&enity=user
> > >> >
> > >> > Th

RE: How to select one entity at a time?

2008-10-01 Thread Neville Burnell
Hi Con,

what RDBMS are you using?

This looks like a SQL syntax problem, perhaps the 'literal as column' is not 
right for your setup [while it works for my MS SQL Server].
 
An alternative to supplying the "rowtype" attribute as a literal in the SQL 
clause is to use a Solr DIH Template Transformer 
http://wiki.apache.org/solr/DataImportHandler#transformer

This should allow you to keep the working SQL. For example






> -Original Message-
> From: con [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 1 October 2008 5:48 PM
> To: solr-user@lucene.apache.org
> Subject: RE: How to select one entity at a time?
> 
> 
> That is exactly what my problem is.:handshake:
> Thanks for you reply.
> 
> But I tried your suggestion:
> Updated the data-config.xml as;
> 
> 
> 
> 
> But when I perform the full import itself, it is throwing exception,
> 
>SEVERE: Exception while processing: user document :
> SolrInputDocumnt[{}]
> org.apache.solr.handler.dataimport.DataImportHandlerException:
> Unable to
> execute
> query: select 'user' as rowtype,* from USER Processing Document # 1
> ...
> So, as expected, when I go to search it is giving- undefined field
> rowtype-
> error.!!!
> Do I need to update any other files or fields?
> 
> I am happy that it worked for you...:jumping::jumping:
> Looking forward for your reply
> Thanks
> con
> 
> 
> 
> 
> Neville Burnell wrote:
> >
> > Hi,
> >
> >> But while performing a search, if I want to search only the data
> from
> >> USER table, how can I acheive it.
> >
> > In my app+solr index, we solved this problem by "tagging" entities
> with a
> > "rowtype" attribute, something like this:
> >
> > 
> > 
> >
> > Then your 'users' only query becomes something like:
> >
> > http://localhost:8983/solr/select/?q=(bob AND
> > rowtype:user)&version=2.2&start=0&rows=10&indent=on&wt=json
> >
> > Hope this helps
> >
> >
> >
> >> -Original Message-
> >> From: con [mailto:[EMAIL PROTECTED]
> >> Sent: Wednesday, 1 October 2008 4:54 PM
> >> To: solr-user@lucene.apache.org
> >> Subject: Re: How to select one entity at a time?
> >>
> >>
> >> Of course I agree.
> >> But while performing a search, if I want to search only the data
> from
> >> USER
> >> table, how can I acheive it.
> >>
> >> Suppose I have a user name bob in both USER and MANAGER tables. So
> when
> >> I
> >> perform http://localhost:8983/solr/dataimport?command=full-import ,
> all
> >> the
> >> USER and MANAGER values will get indexed.
> >> And when i do a search like,
> >>
> http://localhost:8983/solr/select/?q=bob&version=2.2&start=0&rows=10&in
> >> dent=on&wt=json
> >> it will return all the values indexed from both USER and MANAGER
> table.
> >> But I want only the data indexed from either USER table or MANAGER
> >> table at
> >> a time based on the end user's choice. How can I achieve it.
> >>
> >> Thanks for your reply
> >> con
> >>
> >>
> >> Noble Paul നോബിള്‍ नोब्ळ् wrote:
> >> >
> >> > The entity and the select query has no relationship
> >> > The entity comes into picture when you do a dataimport
> >> >
> >> > eg:
> >> > http://localhost:8983/solr/dataimport?command=full-
> import&enity=user
> >> >
> >> > This is an indexing operation
> >> >
> >> > On Wed, Oct 1, 2008 at 11:26 AM, con <[EMAIL PROTECTED]> wrote:
> >> >>
> >> >> Hi guys,
> >> >> In the URL, http://localhost:8983/solr/select/?q=
> >> >> :bob&version=2.2&start=0&rows=10&indent=on&wt=json
> >> >>
> >> >> q=: applies to a field and not to an entity. So If I have 3
> >> entities
> >> >> like:
> >> >>
> >> >> 
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> 
> >> >>
> >

RE: How to select one entity at a time?

2008-10-01 Thread con

That is exactly what my problem is.:handshake:
Thanks for you reply.

But I tried your suggestion:
Updated the data-config.xml as;

 
 

But when I perform the full import itself, it is throwing exception, 

   SEVERE: Exception while processing: user document : SolrInputDocumnt[{}]
org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to
execute
query: select 'user' as rowtype,* from USER Processing Document # 1
...
So, as expected, when I go to search it is giving- undefined field rowtype-
error.!!!
Do I need to update any other files or fields?

I am happy that it worked for you...:jumping::jumping:
Looking forward for your reply
Thanks
con




Neville Burnell wrote:
> 
> Hi,
> 
>> But while performing a search, if I want to search only the data from
>> USER table, how can I acheive it.
> 
> In my app+solr index, we solved this problem by "tagging" entities with a
> "rowtype" attribute, something like this:
> 
> 
> 
> 
> Then your 'users' only query becomes something like:
> 
> http://localhost:8983/solr/select/?q=(bob AND
> rowtype:user)&version=2.2&start=0&rows=10&indent=on&wt=json
> 
> Hope this helps
> 
> 
>  
>> -Original Message-----
>> From: con [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, 1 October 2008 4:54 PM
>> To: solr-user@lucene.apache.org
>> Subject: Re: How to select one entity at a time?
>> 
>> 
>> Of course I agree.
>> But while performing a search, if I want to search only the data from
>> USER
>> table, how can I acheive it.
>> 
>> Suppose I have a user name bob in both USER and MANAGER tables. So when
>> I
>> perform http://localhost:8983/solr/dataimport?command=full-import , all
>> the
>> USER and MANAGER values will get indexed.
>> And when i do a search like,
>> http://localhost:8983/solr/select/?q=bob&version=2.2&start=0&rows=10&in
>> dent=on&wt=json
>> it will return all the values indexed from both USER and MANAGER table.
>> But I want only the data indexed from either USER table or MANAGER
>> table at
>> a time based on the end user's choice. How can I achieve it.
>> 
>> Thanks for your reply
>> con
>> 
>> 
>> Noble Paul നോബിള്‍ नोब्ळ् wrote:
>> >
>> > The entity and the select query has no relationship
>> > The entity comes into picture when you do a dataimport
>> >
>> > eg:
>> > http://localhost:8983/solr/dataimport?command=full-import&enity=user
>> >
>> > This is an indexing operation
>> >
>> > On Wed, Oct 1, 2008 at 11:26 AM, con <[EMAIL PROTECTED]> wrote:
>> >>
>> >> Hi guys,
>> >> In the URL, http://localhost:8983/solr/select/?q=
>> >> :bob&version=2.2&start=0&rows=10&indent=on&wt=json
>> >>
>> >> q=: applies to a field and not to an entity. So If I have 3
>> entities
>> >> like:
>> >>
>> >> 
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> 
>> >>
>> >> I cannot invoke the entity, 'user', just like the above url. i went
>> >> through
>> >> the possible arguments but didnt found a way to invoke an entity. Is
>> >> there a
>> >> way for this purpose.
>> >> ragards
>> >> con
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> con wrote:
>> >>>
>> >>> Thanks Everybody.
>> >>> I have went through the wiki and some other docs. Actually I have a
>> >>> tight
>> >>> schedule and I have to look into various other things along with
>> this.
>> >>> Currently I am looking into rebuilding solr by writing a wrapper
>> class.
>> >>> I will update you with more meaningful questions soon..
>> >>> thanks and regards.
>> >>> con
>> >>>
>> >>>
>> >>> Norberto Meijome-6 wrote:
>> >>>>
>> >>>> On Fri, 26 Sep 2008 02:35:18 -0700 (PDT)
>> >>>> con <[EMAIL PROTECTED]> wrote:
>> >>>>
>> >>&g

RE: How to select one entity at a time?

2008-10-01 Thread Neville Burnell
Hi,

> But while performing a search, if I want to search only the data from
> USER table, how can I acheive it.

In my app+solr index, we solved this problem by "tagging" entities with a 
"rowtype" attribute, something like this:




Then your 'users' only query becomes something like:

http://localhost:8983/solr/select/?q=(bob AND 
rowtype:user)&version=2.2&start=0&rows=10&indent=on&wt=json

Hope this helps


 
> -Original Message-
> From: con [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 1 October 2008 4:54 PM
> To: solr-user@lucene.apache.org
> Subject: Re: How to select one entity at a time?
> 
> 
> Of course I agree.
> But while performing a search, if I want to search only the data from
> USER
> table, how can I acheive it.
> 
> Suppose I have a user name bob in both USER and MANAGER tables. So when
> I
> perform http://localhost:8983/solr/dataimport?command=full-import , all
> the
> USER and MANAGER values will get indexed.
> And when i do a search like,
> http://localhost:8983/solr/select/?q=bob&version=2.2&start=0&rows=10&in
> dent=on&wt=json
> it will return all the values indexed from both USER and MANAGER table.
> But I want only the data indexed from either USER table or MANAGER
> table at
> a time based on the end user's choice. How can I achieve it.
> 
> Thanks for your reply
> con
> 
> 
> Noble Paul നോബിള്‍ नोब्ळ् wrote:
> >
> > The entity and the select query has no relationship
> > The entity comes into picture when you do a dataimport
> >
> > eg:
> > http://localhost:8983/solr/dataimport?command=full-import&enity=user
> >
> > This is an indexing operation
> >
> > On Wed, Oct 1, 2008 at 11:26 AM, con <[EMAIL PROTECTED]> wrote:
> >>
> >> Hi guys,
> >> In the URL, http://localhost:8983/solr/select/?q=
> >> :bob&version=2.2&start=0&rows=10&indent=on&wt=json
> >>
> >> q=: applies to a field and not to an entity. So If I have 3
> entities
> >> like:
> >>
> >> 
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> 
> >>
> >> I cannot invoke the entity, 'user', just like the above url. i went
> >> through
> >> the possible arguments but didnt found a way to invoke an entity. Is
> >> there a
> >> way for this purpose.
> >> ragards
> >> con
> >>
> >>
> >>
> >>
> >>
> >>
> >> con wrote:
> >>>
> >>> Thanks Everybody.
> >>> I have went through the wiki and some other docs. Actually I have a
> >>> tight
> >>> schedule and I have to look into various other things along with
> this.
> >>> Currently I am looking into rebuilding solr by writing a wrapper
> class.
> >>> I will update you with more meaningful questions soon..
> >>> thanks and regards.
> >>> con
> >>>
> >>>
> >>> Norberto Meijome-6 wrote:
> >>>>
> >>>> On Fri, 26 Sep 2008 02:35:18 -0700 (PDT)
> >>>> con <[EMAIL PROTECTED]> wrote:
> >>>>
> >>>>> What you meant is correct only. Please excuse for that I am new
> to
> >>>>> solr.
> >>>>> :-(
> >>>>
> >>>> Con, have a read here :
> >>>>
> >>>> http://www.ibm.com/developerworks/java/library/j-solr1/
> >>>>
> >>>> it helped me pick up the basics a while back. it refers to 1.2,
> but the
> >>>> core concepts are relevant to 1.3 too.
> >>>>
> >>>> b
> >>>> _
> >>>> {Beto|Norberto|Numard} Meijome
> >>>>
> >>>> Hildebrant's Principle:
> >>>> If you don't know where you are going,
> >>>> any road will get you there.
> >>>>
> >>>> I speak for myself, not my employer. Contents may be hot. Slippery
> when
> >>>> wet. Reading disclaimers makes you go blind. Writing them is
> worse. You
> >>>> have been Warned.
> >>>>
> >>>>
> >>>
> >>>
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/How-to-select-one-entity-at-a-time--
> tp19668759p19754869.html
> >> Sent from the Solr - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> >
> > --
> > --Noble Paul
> >
> >
> 
> --
> View this message in context: http://www.nabble.com/How-to-select-one-
> entity-at-a-time--tp19668759p19755437.html
> Sent from the Solr - User mailing list archive at Nabble.com.



Re: How to select one entity at a time?

2008-09-30 Thread con

Of course I agree.
But while performing a search, if I want to search only the data from USER
table, how can I acheive it.

Suppose I have a user name bob in both USER and MANAGER tables. So when I
perform http://localhost:8983/solr/dataimport?command=full-import , all the
USER and MANAGER values will get indexed. 
And when i do a search like,
http://localhost:8983/solr/select/?q=bob&version=2.2&start=0&rows=10&indent=on&wt=json
it will return all the values indexed from both USER and MANAGER table.
But I want only the data indexed from either USER table or MANAGER table at
a time based on the end user's choice. How can I achieve it.

Thanks for your reply 
con 


Noble Paul നോബിള്‍ नोब्ळ् wrote:
> 
> The entity and the select query has no relationship
> The entity comes into picture when you do a dataimport
> 
> eg:
> http://localhost:8983/solr/dataimport?command=full-import&enity=user
> 
> This is an indexing operation
> 
> On Wed, Oct 1, 2008 at 11:26 AM, con <[EMAIL PROTECTED]> wrote:
>>
>> Hi guys,
>> In the URL, http://localhost:8983/solr/select/?q=
>> :bob&version=2.2&start=0&rows=10&indent=on&wt=json
>>
>> q=: applies to a field and not to an entity. So If I have 3 entities
>> like:
>>
>> 
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> 
>>
>> I cannot invoke the entity, 'user', just like the above url. i went
>> through
>> the possible arguments but didnt found a way to invoke an entity. Is
>> there a
>> way for this purpose.
>> ragards
>> con
>>
>>
>>
>>
>>
>>
>> con wrote:
>>>
>>> Thanks Everybody.
>>> I have went through the wiki and some other docs. Actually I have a
>>> tight
>>> schedule and I have to look into various other things along with this.
>>> Currently I am looking into rebuilding solr by writing a wrapper class.
>>> I will update you with more meaningful questions soon..
>>> thanks and regards.
>>> con
>>>
>>>
>>> Norberto Meijome-6 wrote:

 On Fri, 26 Sep 2008 02:35:18 -0700 (PDT)
 con <[EMAIL PROTECTED]> wrote:

> What you meant is correct only. Please excuse for that I am new to
> solr.
> :-(

 Con, have a read here :

 http://www.ibm.com/developerworks/java/library/j-solr1/

 it helped me pick up the basics a while back. it refers to 1.2, but the
 core concepts are relevant to 1.3 too.

 b
 _
 {Beto|Norberto|Numard} Meijome

 Hildebrant's Principle:
 If you don't know where you are going,
 any road will get you there.

 I speak for myself, not my employer. Contents may be hot. Slippery when
 wet. Reading disclaimers makes you go blind. Writing them is worse. You
 have been Warned.


>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-select-one-entity-at-a-time--tp19668759p19754869.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> --Noble Paul
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-select-one-entity-at-a-time--tp19668759p19755437.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: How to select one entity at a time?

2008-09-30 Thread Noble Paul നോബിള്‍ नोब्ळ्
The entity and the select query has no relationship
The entity comes into picture when you do a dataimport

eg:
http://localhost:8983/solr/dataimport?command=full-import&enity=user

This is an indexing operation

On Wed, Oct 1, 2008 at 11:26 AM, con <[EMAIL PROTECTED]> wrote:
>
> Hi guys,
> In the URL, http://localhost:8983/solr/select/?q=
> :bob&version=2.2&start=0&rows=10&indent=on&wt=json
>
> q=: applies to a field and not to an entity. So If I have 3 entities
> like:
>
> 
>
>
>
>
>
>
>
>
>
>
>
> 
>
> I cannot invoke the entity, 'user', just like the above url. i went through
> the possible arguments but didnt found a way to invoke an entity. Is there a
> way for this purpose.
> ragards
> con
>
>
>
>
>
>
> con wrote:
>>
>> Thanks Everybody.
>> I have went through the wiki and some other docs. Actually I have a tight
>> schedule and I have to look into various other things along with this.
>> Currently I am looking into rebuilding solr by writing a wrapper class.
>> I will update you with more meaningful questions soon..
>> thanks and regards.
>> con
>>
>>
>> Norberto Meijome-6 wrote:
>>>
>>> On Fri, 26 Sep 2008 02:35:18 -0700 (PDT)
>>> con <[EMAIL PROTECTED]> wrote:
>>>
 What you meant is correct only. Please excuse for that I am new to solr.
 :-(
>>>
>>> Con, have a read here :
>>>
>>> http://www.ibm.com/developerworks/java/library/j-solr1/
>>>
>>> it helped me pick up the basics a while back. it refers to 1.2, but the
>>> core concepts are relevant to 1.3 too.
>>>
>>> b
>>> _
>>> {Beto|Norberto|Numard} Meijome
>>>
>>> Hildebrant's Principle:
>>> If you don't know where you are going,
>>> any road will get you there.
>>>
>>> I speak for myself, not my employer. Contents may be hot. Slippery when
>>> wet. Reading disclaimers makes you go blind. Writing them is worse. You
>>> have been Warned.
>>>
>>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/How-to-select-one-entity-at-a-time--tp19668759p19754869.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>



-- 
--Noble Paul


Re: How to select one entity at a time?

2008-09-30 Thread con

Hi guys,
In the URL, http://localhost:8983/solr/select/?q=
:bob&version=2.2&start=0&rows=10&indent=on&wt=json 

q=: applies to a field and not to an entity. So If I have 3 entities
like:

 
 
 
 
 

 
 

 
 
 
 

I cannot invoke the entity, 'user', just like the above url. i went through
the possible arguments but didnt found a way to invoke an entity. Is there a
way for this purpose.
ragards
con






con wrote:
> 
> Thanks Everybody.
> I have went through the wiki and some other docs. Actually I have a tight
> schedule and I have to look into various other things along with this.
> Currently I am looking into rebuilding solr by writing a wrapper class.
> I will update you with more meaningful questions soon.. 
> thanks and regards.
> con
> 
> 
> Norberto Meijome-6 wrote:
>> 
>> On Fri, 26 Sep 2008 02:35:18 -0700 (PDT)
>> con <[EMAIL PROTECTED]> wrote:
>> 
>>> What you meant is correct only. Please excuse for that I am new to solr.
>>> :-(
>> 
>> Con, have a read here :
>> 
>> http://www.ibm.com/developerworks/java/library/j-solr1/
>> 
>> it helped me pick up the basics a while back. it refers to 1.2, but the
>> core concepts are relevant to 1.3 too.
>> 
>> b
>> _
>> {Beto|Norberto|Numard} Meijome
>> 
>> Hildebrant's Principle:
>> If you don't know where you are going,
>> any road will get you there.
>> 
>> I speak for myself, not my employer. Contents may be hot. Slippery when
>> wet. Reading disclaimers makes you go blind. Writing them is worse. You
>> have been Warned.
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-select-one-entity-at-a-time--tp19668759p19754869.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: How to select one entity at a time?

2008-09-29 Thread con

Thanks Everybody.
I have went through the wiki and some other docs. Actually I have a tight
schedule and I have to look into various other things along with this.
Currently I am looking into rebuilding solr by writing a wrapper class.
I will update you with more meaningful questions soon.. 
thanks and regards.
con


Norberto Meijome-6 wrote:
> 
> On Fri, 26 Sep 2008 02:35:18 -0700 (PDT)
> con <[EMAIL PROTECTED]> wrote:
> 
>> What you meant is correct only. Please excuse for that I am new to solr.
>> :-(
> 
> Con, have a read here :
> 
> http://www.ibm.com/developerworks/java/library/j-solr1/
> 
> it helped me pick up the basics a while back. it refers to 1.2, but the
> core concepts are relevant to 1.3 too.
> 
> b
> _
> {Beto|Norberto|Numard} Meijome
> 
> Hildebrant's Principle:
> If you don't know where you are going,
> any road will get you there.
> 
> I speak for myself, not my employer. Contents may be hot. Slippery when
> wet. Reading disclaimers makes you go blind. Writing them is worse. You
> have been Warned.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-select-one-entity-at-a-time--tp19668759p19736899.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: How to select one entity at a time?

2008-09-26 Thread Norberto Meijome
On Fri, 26 Sep 2008 02:35:18 -0700 (PDT)
con <[EMAIL PROTECTED]> wrote:

> What you meant is correct only. Please excuse for that I am new to solr. :-(

Con, have a read here :

http://www.ibm.com/developerworks/java/library/j-solr1/

it helped me pick up the basics a while back. it refers to 1.2, but the core 
concepts are relevant to 1.3 too.

b
_
{Beto|Norberto|Numard} Meijome

Hildebrant's Principle:
If you don't know where you are going,
any road will get you there.

I speak for myself, not my employer. Contents may be hot. Slippery when wet. 
Reading disclaimers makes you go blind. Writing them is worse. You have been 
Warned.


Re: How to select one entity at a time?

2008-09-26 Thread Norberto Meijome
On Fri, 26 Sep 2008 02:35:18 -0700 (PDT)
con <[EMAIL PROTECTED]> wrote:

> What you meant is correct only. Please excuse for that I am new to solr. :-(

hi Con,
nothing to be excused for..but you may want to read the wiki , as it provides
quite a lot of information that should answer your questions. DIH is great, but
I wouldn't go near it until you understand how to create your own schema.xml
and solrconfig.xml .

http://wiki.apache.org/solr/FrontPage is the wiki

( everyone else ... is there a guide on getting started on SOLR ? step by step,
taking the example and changing it for your own use?  )

> I want to index all the query results. (I think this will be done by the
> data-config.xml) 

hmm...terminology :-) 
you index documents (similar to records in a database).

when you send a query to Solr, you will get results if your query 

> Now while accessing this indexed data, i need this filtering. ie. Either
> user or manager.
> I tried your suggestion:
> http://localhost:8983/solr/select/?q=user:bob&version=2.2&start=0&rows=10&indent=on&wt=json

the url LOOKS ok. do you have any document in your index with field user
containing 'bob; ? 

try this to get all results ( xml format, first 3 results only...

http://localhost:8983/solr/select/?q=*:*&rows=3

then, find a field with a value , then search for that value and see if you get
that document back - it should work...(with lots of caveats, yes)..

If you send us the result we can help u understand better why it isn't
working as you intend..
b
_
{Beto|Norberto|Numard} Meijome

"First they ignore you, then they laugh at you, then they fight you, then you
win." Mahatma Gandhi.

I speak for myself, not my employer. Contents may be hot. Slippery when wet.
Reading disclaimers makes you go blind. Writing them is worse. You have been
Warned.


Re: How to select one entity at a time?

2008-09-26 Thread con

What you meant is correct only. Please excuse for that I am new to solr. :-(
I want to index all the query results. (I think this will be done by the
data-config.xml) 
Now while accessing this indexed data, i need this filtering. ie. Either
user or manager.
I tried your suggestion:
http://localhost:8983/solr/select/?q=user:bob&version=2.2&start=0&rows=10&indent=on&wt=json
But it didn't worked. Is the above URL correct or is there some other
option.


Thanks for your reply.. 
con





Norberto Meijome-6 wrote:
> 
> On Fri, 26 Sep 2008 00:46:07 -0700 (PDT)
> con <[EMAIL PROTECTED]> wrote:
> 
>> To be more specific:
>> I have the data-config.xml just like: 
>> 
>>  
>>  
>>   
>>  
>>  
>>  
>>  
>> 
>>  
>>  
>>  
>> 
> 
> Con, I may be confused here...are you asking how to load only data from
> your USERS SQL table into SOLR, or how to search in your SOLR index for
> data about 'USERS'.
> 
> data-config.xml is only relevant for the Data Import Handler...but your
> following question:
> 
>> 
>> I have 3 search conditions. when the client wants to search all the
>> users,
>> only the entity, 'user' must be executed. And if he wants to search all
>> managers, the entity, 'manager' must be executed.
>> 
>> How can i accomplish this through url?
> 
> *seems* to indicate you want to search on this .
> 
> If you want to search on a particular field from your SOLR schema, DIH is
> not involved. If you use the standard QH, you say ?q=user:Bob 
> 
> If I misunderstood your question, please explain...
> 
> cheers,
> b
> _
> {Beto|Norberto|Numard} Meijome
> 
> "Everything is interesting if you go into it deeply enough"
>   Richard Feynman
> 
> I speak for myself, not my employer. Contents may be hot. Slippery when
> wet. Reading disclaimers makes you go blind. Writing them is worse. You
> have been Warned.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-select-one-entity-at-a-time--tp19668759p19685292.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: How to select one entity at a time?

2008-09-26 Thread Norberto Meijome
On Fri, 26 Sep 2008 00:46:07 -0700 (PDT)
con <[EMAIL PROTECTED]> wrote:

> To be more specific:
> I have the data-config.xml just like: 
> 
>   
>   
>
>   
>   
>   
>   
> 
>   
>   
>   
> 

Con, I may be confused here...are you asking how to load only data from your 
USERS SQL table into SOLR, or how to search in your SOLR index for data about 
'USERS'.

data-config.xml is only relevant for the Data Import Handler...but your 
following question:

> 
> I have 3 search conditions. when the client wants to search all the users,
> only the entity, 'user' must be executed. And if he wants to search all
> managers, the entity, 'manager' must be executed.
> 
> How can i accomplish this through url?

*seems* to indicate you want to search on this .

If you want to search on a particular field from your SOLR schema, DIH is not 
involved. If you use the standard QH, you say ?q=user:Bob 

If I misunderstood your question, please explain...

cheers,
b
_
{Beto|Norberto|Numard} Meijome

"Everything is interesting if you go into it deeply enough"
  Richard Feynman

I speak for myself, not my employer. Contents may be hot. Slippery when wet. 
Reading disclaimers makes you go blind. Writing them is worse. You have been 
Warned.


Re: How to select one entity at a time?

2008-09-26 Thread con

To be more specific:
I have the data-config.xml just like: 



 










I have 3 search conditions. when the client wants to search all the users,
only the entity, 'user' must be executed. And if he wants to search all
managers, the entity, 'manager' must be executed.

How can i accomplish this through url?

Thanks
con 




Shalin Shekhar Mangar wrote:
> 
> On Thu, Sep 25, 2008 at 6:13 PM, con <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hi
>> I have got two entities in my data-config.xml file, entity1 and entity2.
>> For condition-A I need to execute only entity1 and for condition-B only
>> the
>> entity2 needs to get executed.
>> How can I mention it while accessing the search index in the REST way.
>> Is there any option that i can give along with this query:
>>
>> http://localhost:8983/solr/select/?q=physics&version=2.2&start=0&rows=10&indent=on&wt=json
>>
> 
> I suppose that you are using multiple root entities and the solr document
> contains some field which tells us the entity it came from.
> 
> If yes, you can use filter queries (fq parameter) to filter on those
> fields.
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-select-one-entity-at-a-time--tp19668759p19683927.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: How to select one entity at a time?

2008-09-25 Thread Shalin Shekhar Mangar
On Thu, Sep 25, 2008 at 6:13 PM, con <[EMAIL PROTECTED]> wrote:

>
> Hi
> I have got two entities in my data-config.xml file, entity1 and entity2.
> For condition-A I need to execute only entity1 and for condition-B only the
> entity2 needs to get executed.
> How can I mention it while accessing the search index in the REST way.
> Is there any option that i can give along with this query:
>
> http://localhost:8983/solr/select/?q=physics&version=2.2&start=0&rows=10&indent=on&wt=json
>

I suppose that you are using multiple root entities and the solr document
contains some field which tells us the entity it came from.

If yes, you can use filter queries (fq parameter) to filter on those fields.

-- 
Regards,
Shalin Shekhar Mangar.