Re: DataImporter

2010-07-14 Thread Bilgin Ibryam
Is it possible that you have the same IDs in both entities?
Could you show here your entity mappings?

Bilgin Ibryam

On Wed, Jul 14, 2010 at 11:48 AM, Amdebirhan, Samson, VF-Group <
samson.amdebir...@vodafone.com> wrote:

> Hi all,
>
>
>
> Can someone help me in this ?
>
>
>
> Importing 2 different entities one by one (specifying through the entity
> parameter) why is the second import deleting the previous created index
> for first entity and vice-versa?
>
>
>
> The documentation provided by the solr website reports that :
>
>
>
> "entity : Name of an entity directly under the  tag. Use this
> to execute one or more entities selectively. Multiple 'entity'
> parameters can be passed on to run multiple entities at once. If nothing
> is passed , all entities are executed".
>
>
>
> The problem results the deletion of index already present for other
> entities.
>
>
>
>
>
> Regards.
>
> Sam
>
>
>
>
>
>
>
>


Re: Securing Solr 1.4 in a glassfish container AS NEW THREAD

2010-07-16 Thread Bilgin Ibryam
Hi Jon,

SolrJ (CommonsHttpSolrServer) internally uses apache http client to connect
to solr. You can check there for some documentation.
I secured solr also with BASIC auth-method and use the following snippet to
access it from solrJ:

  //set username and password
  ((CommonsHttpSolrServer)
server).getHttpClient().getParams().setAuthenticationPreemptive(true);
  Credentials defaultcreds = new UsernamePasswordCredentials("username",
"secret");
  ((CommonsHttpSolrServer)
server).getHttpClient().getState().setCredentials(new AuthScope("localhost",
80, AuthScope.ANY_REALM), defaultcreds);

HTH
Bilgin Ibryam



On Fri, Jul 16, 2010 at 2:35 AM, Sharp, Jonathan  wrote:

> Hi All,
>
> I am considering securing Solr with basic auth in glassfish using the
> container, by adding to web.xml and adding sun-web.xml file to the
> distributed WAR as below.
>
> If using SolrJ to index files, how can I provide the credentials for
> authentication to the http-client (or can someone point me in the direction
> of the right documentation to do that or that will help me make the
> appropriate modifications) ?
>
> Also any comment on the below is appreciated.
>
> Add this to web.xml
> ---
>   
>   BASIC
>   SomeRealm
>   
>   
>   
>   Admin Pages
>   /admin
>   /admin/*
>
> GETPOSTPUTTRACEHEADOPTIONSDELETE
>   
>   
>   SomeAdminRole
>   
>   
>   
>   
>   Update Servlet
>   /update/*
>
> GETPOSTPUTTRACEHEADOPTIONSDELETE
>   
>   
>   SomeUpdateRole
>   
>   
>   
>   
>   Select Servlet
>   /select/*
>
> GETPOSTPUTTRACEHEADOPTIONSDELETE
>   
>   
>   SomeSearchRole
>   
>   
> ---
>
> Also add this as sun-web.xml
>
> 
> 
>  Server 9.0 Servlet 2.5//EN" "
> http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd";>
> 
>  /Solr
>  
>   
> Keep a copy of the generated servlet class' java
> code.
>   
>  
>  
> SomeAdminRole
> SomeAdminGroup
>  
>  
> SomeUpdateRole
> SomeUpdateGroup
>  
>  
> SomeSearchRole
> SomeSearchGroup
>  
> 
> --
>
> -Jon
>
>
> -
> SECURITY/CONFIDENTIALITY WARNING: This message and any attachments are
> intended solely for the individual or entity to which they are addressed.
> This communication may contain information that is privileged, confidential,
> or exempt from disclosure under applicable law (e.g., personal health
> information, research data, financial information). Because this e-mail has
> been sent without encryption, individuals other than the intended recipient
> may be able to view the information, forward it to others or tamper with the
> information without the knowledge or consent of the sender. If you are not
> the intended recipient, or the employee or person responsible for delivering
> the message to the intended recipient, any dissemination, distribution or
> copying of the communication is strictly prohibited. If you received the
> communication in error, please notify the sender immediately by replying to
> this message and deleting the message and any accompanying files from your
> system. If, due to the security risks, you do not wis
> h to
> receive further communications via e-mail, please reply to this message and
> inform the sender that you do not wish to receive further e-mail from the
> sender.
> -
>
>


Beginner question

2010-07-20 Thread Bilgin Ibryam
Hi all,

I have two simple questions:

I have an Item entity with id, name, category and description fields. The
main requirements is to be able to search in all the fields with the same
string and different priority per field, so matches in name appear before
category matches, and they appear before description field matches in the
result list.

1. I think to create an index having the same fields, because each field
needs different priority during searching.

2. And then do the search with a query like this:
name:search_string^1.3 OR categpry:search_string^1.2 OR
description:search_string^1.1

Is this the right approach to model the index and search query?

Thanks in advance.
Bilgin


Re: Beginner question

2010-07-20 Thread Bilgin Ibryam
Thanks for the answers guys.

So I assume that storing entity each field in as a separate index field is
correct, since they will get different scoring.

Is it possible to use dismax query parser using solrJ, since this is how I'm
going to access solr?



On Tue, Jul 20, 2010 at 10:46 AM, MitchK  wrote:

>
> Here you can find params and their meanings for the dismax-handler.
> You may not find anything in the wiki by searching for a parser ;).
>
> Link:  http://wiki.apache.org/solr/DisMaxRequestHandler Wiki:
> DisMaxRequestHandler
>
> Kind regards
> - Mitch
>
>
>
> Erik Hatcher-4 wrote:
> >
> > Consider using the dismax query parser instead.  It has more
> > sophisticated capability to spread user queries across multiple fields
> > with different weightings.
> >
> >   Erik
> >
> > On Jul 20, 2010, at 4:34 AM, Bilgin Ibryam wrote:
> >
> >> Hi all,
> >>
> >> I have two simple questions:
> >>
> >> I have an Item entity with id, name, category and description
> >> fields. The
> >> main requirements is to be able to search in all the fields with the
> >> same
> >> string and different priority per field, so matches in name appear
> >> before
> >> category matches, and they appear before description field matches
> >> in the
> >> result list.
> >>
> >> 1. I think to create an index having the same fields, because each
> >> field
> >> needs different priority during searching.
> >>
> >> 2. And then do the search with a query like this:
> >> name:search_string^1.3 OR categpry:search_string^1.2 OR
> >> description:search_string^1.1
> >>
> >> Is this the right approach to model the index and search query?
> >>
> >> Thanks in advance.
> >> Bilgin
> >
> >
> >
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Beginner-question-tp980695p980819.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: Securing Solr 1.4 in a glassfish container AS NEW THREAD

2010-07-22 Thread Bilgin Ibryam
Are you using the same instance of CommonsHttpSolrServer for all the
requests?

On Wed, Jul 21, 2010 at 4:50 PM, Sharp, Jonathan  wrote:

>
> Some further information --
>
> I tried indexing a batch of PDFs with the client and Solr CELL, setting
> the credentials in the httpclient. For some reason after successfully
> indexing several hundred files I start getting a "SolrException:
> Unauthorized" and an info message (for every subsequent file):
>
> INFO basic authentication scheme selected
> Org.apache.commons.httpclient.HttpMethodDirector process
> WWWAuthChallenge
> INFO Failure authenticating with BASIC ''@host:port
>
> I increased session timeout in web.xml with no change. I'm looking
> through the httpclient authentication now.
>
> -Jon
>
> -Original Message-
> From: Sharp, Jonathan
> Sent: Friday, July 16, 2010 8:59 AM
> To: 'solr-user@lucene.apache.org'
> Subject: RE: Securing Solr 1.4 in a glassfish container AS NEW THREAD
>
> Hi Bilgin,
>
> Thanks for the snippet -- that helps a lot.
>
> -Jon
>
> -Original Message-
> From: Bilgin Ibryam [mailto:bibr...@gmail.com]
> Sent: Friday, July 16, 2010 1:31 AM
> To: solr-user@lucene.apache.org
> Subject: Re: Securing Solr 1.4 in a glassfish container AS NEW THREAD
>
> Hi Jon,
>
> SolrJ (CommonsHttpSolrServer) internally uses apache http client to
> connect
> to solr. You can check there for some documentation.
> I secured solr also with BASIC auth-method and use the following snippet
> to
> access it from solrJ:
>
>  //set username and password
>  ((CommonsHttpSolrServer)
> server).getHttpClient().getParams().setAuthenticationPreemptive(true);
>  Credentials defaultcreds = new
> UsernamePasswordCredentials("username",
> "secret");
>  ((CommonsHttpSolrServer)
> server).getHttpClient().getState().setCredentials(new
> AuthScope("localhost",
> 80, AuthScope.ANY_REALM), defaultcreds);
>
> HTH
> Bilgin Ibryam
>
>
>
> On Fri, Jul 16, 2010 at 2:35 AM, Sharp, Jonathan  wrote:
>
> > Hi All,
> >
> > I am considering securing Solr with basic auth in glassfish using the
> > container, by adding to web.xml and adding sun-web.xml file to the
> > distributed WAR as below.
> >
> > If using SolrJ to index files, how can I provide the credentials for
> > authentication to the http-client (or can someone point me in the
> direction
> > of the right documentation to do that or that will help me make the
> > appropriate modifications) ?
> >
> > Also any comment on the below is appreciated.
> >
> > Add this to web.xml
> > ---
> >   
> >   BASIC
> >   SomeRealm
> >   
> >   
> >   
> >   Admin Pages
> >   /admin
> >   /admin/*
> >
> >
> GETPOST d>PUTTRACEHEAD p-method>OPTIONSDELETE hod>
> >   
> >   
> >   SomeAdminRole
> >   
> >   
> >   
> >   
> >   Update Servlet
> >   /update/*
> >
> >
> GETPOST d>PUTTRACEHEAD p-method>OPTIONSDELETE hod>
> >   
> >   
> >   SomeUpdateRole
> >   
> >   
> >   
> >   
> >   Select Servlet
> >   /select/*
> >
> >
> GETPOST d>PUTTRACEHEAD p-method>OPTIONSDELETE hod>
> >   
> >   
> >   SomeSearchRole
> >   
> >   
> > ---
> >
> > Also add this as sun-web.xml
> >
> > 
> > 
> >  Application
> > Server 9.0 Servlet 2.5//EN" "
> > http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd";>
> > 
> >  /Solr
> >  
> >   
> > Keep a copy of the generated servlet class' java
> > code.
> >   
> >  
> >  
> > SomeAdminRole
> > SomeAdminGroup
> >  
> >  
> > SomeUpdateRole
> > SomeUpdateGroup
> >  
> >  
> > SomeSearchRole
> > SomeSearchGroup
> >  
> > 
> > --
> >
> > -Jon
> >
> >
> > -
> > SECURITY/CONFIDENTIALITY WARNING: This message and any attachments are
> > intended solely for the individual or entity to which they are
> addressed.
> > This co