Re: SOLR guidance required

2013-05-13 Thread Michael Della Bitta
Best advice in this thread. :)


Michael Della Bitta


Appinions
18 East 41st Street, 2nd Floor
New York, NY 10017-6271

www.appinions.com

The science of influence marketing.


On Mon, May 13, 2013 at 1:29 PM, Lance Norskog  wrote:

> If this is for the US, remove the age range feature before you get sued.
>
>
> On 05/09/2013 08:41 PM, Kamal Palei wrote:
>
>> Dear SOLR experts
>> I might be asking a very silly question. As I am new to SOLR kindly guide
>> me.
>>
>>
>> I have a job site. Using SOLR to search resumes. When a HR user enters
>> some
>> keywords say JAVA, MySQL etc, I search resume documents using SOLR,
>> retrieve 100 records and show to user.
>>
>> The problem I face is say, I retrieved 100 records, then we do filtering
>> for experience range, age range, salary range (using mysql query).
>> Sometimes it so happens that the 100 records I fetch , I do not get a
>> single record to show to user. When user clicks next link there might be
>> few records, it looks odd really.
>>
>>
>> I hope there must be some mechanism, by which I can associate salary,
>> experience, age etc with resume document during indexing. And when
>> I search for resumes I can give all filters accordingly and can retrieve
>> 100 records and strait way I can show 100 records to user without doing
>> any
>> mysql query. Please let me know if this is feasible. If so, kindly give me
>> some pointer how do I do it.
>>
>> Best Regards
>> Kamal
>>
>>
>


Re: SOLR guidance required

2013-05-13 Thread Shawn Heisey

On 5/13/2013 11:55 AM, Furkan KAMACI wrote:

Jason can you explain what you mean at here: "Where OR operators apply,
this does not matter. But your Solr cache will be much more savvy with the
first construct."


If you need to OR different filters together, you have to have all those 
in the same filter query.  Multiple filter queries are ANDed together, 
that can't be changed.


If you need your filter clauses ANDed together, you can split them into 
multiple small filter queries.  Those filters will be cached 
individually.  If you put all of them in the same filter query, then you 
can't re-use pieces of the filter without a new cache entry, so caching 
isn't as efficient.


Thanks,
Shawn



Re: SOLR guidance required

2013-05-13 Thread Upayavira
Multiple fq params are ANDed. So if you have fq=clause1 AND clause2, you
should implement that as fq=clause1&fq=clause2. However, if you want
fq=clause1 OR clause2, you have no choice but to keep it as a single
filter query.

Upayavira

On Mon, May 13, 2013, at 06:55 PM, Furkan KAMACI wrote:
> Jason can you explain what you mean at here: "Where OR operators apply,
> this does not matter. But your Solr cache will be much more savvy with
> the
> first construct."
> 
> 2013/5/13 Lance Norskog 
> 
> > If this is for the US, remove the age range feature before you get sued.
> >
> >
> > On 05/09/2013 08:41 PM, Kamal Palei wrote:
> >
> >> Dear SOLR experts
> >> I might be asking a very silly question. As I am new to SOLR kindly guide
> >> me.
> >>
> >>
> >> I have a job site. Using SOLR to search resumes. When a HR user enters
> >> some
> >> keywords say JAVA, MySQL etc, I search resume documents using SOLR,
> >> retrieve 100 records and show to user.
> >>
> >> The problem I face is say, I retrieved 100 records, then we do filtering
> >> for experience range, age range, salary range (using mysql query).
> >> Sometimes it so happens that the 100 records I fetch , I do not get a
> >> single record to show to user. When user clicks next link there might be
> >> few records, it looks odd really.
> >>
> >>
> >> I hope there must be some mechanism, by which I can associate salary,
> >> experience, age etc with resume document during indexing. And when
> >> I search for resumes I can give all filters accordingly and can retrieve
> >> 100 records and strait way I can show 100 records to user without doing
> >> any
> >> mysql query. Please let me know if this is feasible. If so, kindly give me
> >> some pointer how do I do it.
> >>
> >> Best Regards
> >> Kamal
> >>
> >>
> >


Re: SOLR guidance required

2013-05-13 Thread Furkan KAMACI
Jason can you explain what you mean at here: "Where OR operators apply,
this does not matter. But your Solr cache will be much more savvy with the
first construct."

2013/5/13 Lance Norskog 

> If this is for the US, remove the age range feature before you get sued.
>
>
> On 05/09/2013 08:41 PM, Kamal Palei wrote:
>
>> Dear SOLR experts
>> I might be asking a very silly question. As I am new to SOLR kindly guide
>> me.
>>
>>
>> I have a job site. Using SOLR to search resumes. When a HR user enters
>> some
>> keywords say JAVA, MySQL etc, I search resume documents using SOLR,
>> retrieve 100 records and show to user.
>>
>> The problem I face is say, I retrieved 100 records, then we do filtering
>> for experience range, age range, salary range (using mysql query).
>> Sometimes it so happens that the 100 records I fetch , I do not get a
>> single record to show to user. When user clicks next link there might be
>> few records, it looks odd really.
>>
>>
>> I hope there must be some mechanism, by which I can associate salary,
>> experience, age etc with resume document during indexing. And when
>> I search for resumes I can give all filters accordingly and can retrieve
>> 100 records and strait way I can show 100 records to user without doing
>> any
>> mysql query. Please let me know if this is feasible. If so, kindly give me
>> some pointer how do I do it.
>>
>> Best Regards
>> Kamal
>>
>>
>


Re: SOLR guidance required

2013-05-13 Thread Lance Norskog

If this is for the US, remove the age range feature before you get sued.

On 05/09/2013 08:41 PM, Kamal Palei wrote:

Dear SOLR experts
I might be asking a very silly question. As I am new to SOLR kindly guide
me.


I have a job site. Using SOLR to search resumes. When a HR user enters some
keywords say JAVA, MySQL etc, I search resume documents using SOLR,
retrieve 100 records and show to user.

The problem I face is say, I retrieved 100 records, then we do filtering
for experience range, age range, salary range (using mysql query).
Sometimes it so happens that the 100 records I fetch , I do not get a
single record to show to user. When user clicks next link there might be
few records, it looks odd really.


I hope there must be some mechanism, by which I can associate salary,
experience, age etc with resume document during indexing. And when
I search for resumes I can give all filters accordingly and can retrieve
100 records and strait way I can show 100 records to user without doing any
mysql query. Please let me know if this is feasible. If so, kindly give me
some pointer how do I do it.

Best Regards
Kamal





Re: SOLR guidance required

2013-05-10 Thread Jason Hellman
One more tip on the use of filter queries.

DO:  &fq=name1:value1&fq=name2:value2&fq=namen:valuen

DON'T:  fq=name1:value1 AND name2:value2 AND name3:value3

Where OR operators apply, this does not matter.  But your Solr cache will be 
much more savvy with the first construct.

Jason

On May 10, 2013, at 11:39 AM, pravesh  wrote:

> Aditya,
> 
> As suggested by others, definitely you should use the filter queries
> directly to query SOLR. Just keep your indexes updated.
> Keep all your fields indexed/stored as per your requirements. Refer through
> the filter query wiki
> 
> http://wiki.apache.org/solr/CommonQueryParameters
> <http://wiki.apache.org/solr/CommonQueryParameters>  
> 
> http://wiki.apache.org/solr/SimpleFacetParameters
> <http://wiki.apache.org/solr/SimpleFacetParameters>  
> 
> 
> BTW, almost all the job sites out there (whether small/medium/big) use
> SOLR/lucene to power their searches :) 
> 
> 
> Best
> Pravesh
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/SOLR-guidance-required-tp4062188p4062422.html
> Sent from the Solr - User mailing list archive at Nabble.com.



Re: SOLR guidance required

2013-05-10 Thread pravesh
Aditya,

As suggested by others, definitely you should use the filter queries
directly to query SOLR. Just keep your indexes updated.
Keep all your fields indexed/stored as per your requirements. Refer through
the filter query wiki

http://wiki.apache.org/solr/CommonQueryParameters
<http://wiki.apache.org/solr/CommonQueryParameters>  

http://wiki.apache.org/solr/SimpleFacetParameters
<http://wiki.apache.org/solr/SimpleFacetParameters>  


BTW, almost all the job sites out there (whether small/medium/big) use
SOLR/lucene to power their searches :) 


Best
Pravesh



--
View this message in context: 
http://lucene.472066.n3.nabble.com/SOLR-guidance-required-tp4062188p4062422.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: SOLR guidance required

2013-05-10 Thread Aditya
Hi Kamal,

It is feasible and that is the correct approach. Add additional fields like
salary, experience etc to the index and filter the results. This way you
could directly show the results to the user.

It is always better to avoid two searches one in solr and other in db. You
should maintain search fields in Solr and filter results from Solr. DB is
used to maintain extended fields and may be whole document (resume).

Refer to range query search http://wiki.apache.org/solr/SolrQuerySyntax

Regards
Aditya
www.findbestopensource.com


On Fri, May 10, 2013 at 9:11 AM, Kamal Palei  wrote:

> Dear SOLR experts
> I might be asking a very silly question. As I am new to SOLR kindly guide
> me.
>
>
> I have a job site. Using SOLR to search resumes. When a HR user enters some
> keywords say JAVA, MySQL etc, I search resume documents using SOLR,
> retrieve 100 records and show to user.
>
> The problem I face is say, I retrieved 100 records, then we do filtering
> for experience range, age range, salary range (using mysql query).
> Sometimes it so happens that the 100 records I fetch , I do not get a
> single record to show to user. When user clicks next link there might be
> few records, it looks odd really.
>
>
> I hope there must be some mechanism, by which I can associate salary,
> experience, age etc with resume document during indexing. And when
> I search for resumes I can give all filters accordingly and can retrieve
> 100 records and strait way I can show 100 records to user without doing any
> mysql query. Please let me know if this is feasible. If so, kindly give me
> some pointer how do I do it.
>
> Best Regards
> Kamal
>


Re: SOLR guidance required

2013-05-09 Thread Shawn Heisey
On 5/9/2013 9:41 PM, Kamal Palei wrote:
> I hope there must be some mechanism, by which I can associate salary,
> experience, age etc with resume document during indexing. And when
> I search for resumes I can give all filters accordingly and can retrieve
> 100 records and strait way I can show 100 records to user without doing any
> mysql query. Please let me know if this is feasible. If so, kindly give me
> some pointer how do I do it.

If you define fields for these values in your schema, then you can send
send filter queries to restrict the search.  Solr will filter invalid
documents out and only send the results that match your requirements.
Some examples of the filter queries you can use are below.  You can add
more than one of these; they will be ANDed together.

&fq=age:[21 TO 45]
&fq=experience:[2 TO *]
&fq=salaryReq:[* TO 55000]

If you're using a Solr API (for Java, PHP, etc) rather than constructing
a URL to send directly to Solr, then the API will have a mechanism for
adding filters to your query.

One caveat: unless you can write code that will automatically extract
this information from a resume and/or application, then you will need
someone doing data entry that drives the indexing, or you will need
prospective employees to fill out a computerized form for their application.

Thanks,
Shawn