RE: sort issue in Solr

2012-01-04 Thread Robert Yu
Thanks Gora. Inspired by the link, I've solved case 1 by putting it as a
exact match OR prefix match, such as "BAC" OR "BAC*".
But I can not find solution for case 2 and case 3 below.
Is there anyone can provide suggestions?

Thanks,

-Original Message-
From: Gora Mohanty [mailto:g...@mimirtech.com] 
Sent: Monday, December 26, 2011 12:33 PM
To: solr-user@lucene.apache.org
Subject: Re: sort issue in Solr

On Mon, Dec 26, 2011 at 8:59 AM, Robert Yu 
wrote:
> I want Solr return results by relevancy, but it seems it does not make

> sense. For example, partial match does not return before exact match.
> Even I enabled term length in schema definition.
[...]

There are various factors that can affect Solr relevance.
* You should try your query with debugQuery=1 added,
   which will show you how the score of each document
   is being calculated.
* Please also take a look at
  http://wiki.apache.org/solr/SolrRelevancyCookbook

Regards,
Gora


Re: SearchComponents and ShardResponse

2012-01-04 Thread Chris Hostetter

Hey Ken,

: I feel like I must be missing something here...
: 
: I'm working on a customized version of the SearchHandler, which supports 
: distributed searching in multiple *local* cores.
...
: The SolrResponse field in ShardResponse is private, and the method to set it 
is package private.
: 
: So it doesn't appear like there's any easy way to create the 
: ShardResponse objects that the SearchComponents expect to receive inside 
: of the ResponseBuilder.
...

I don't think you're missing anything.  I think you're running into the 
reality that the SearchHandler + SearchCOmponent + ResponseBuilder + 
ShardResponse APIs haven't ever really been hammered on by many people 
looking to build third-party distributed components outside of the solr 
code base -- let alone trying to replace the SearchHandler itself with 
their own versions, so it's not terribly suprising to me that you'd be 
running into access limitations.

go ahead and open issues with the specific stuff you think should be made 
public/protected -- but the usual caveats to that sort of thing apply of 
course: need to audit everything to make sure we aren't letting 
subclasses/clients stab us in the heart from the inside.

(I'm pretty sure i saw grant open an issue recently about trying to 
clean up the APIs to make it easier to write distributed search components 
... might wnat to follow up there as well)


-Hoss


Re: dih.last_index_time - exacty what time is this capturing?

2012-01-04 Thread astubbs
if you're unique id settings are correct, there won't be any redundancy as
solr will not keep two copies with the same unique id.

--
View this message in context: 
http://lucene.472066.n3.nabble.com/dih-last-index-time-exacty-what-time-is-this-capturing-tp499851p3633391.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: PHP/Solr library

2012-01-04 Thread Stephen Powis
I see the same error from my php/curl script when my request times out.  I
believe you can up your timeouts both in php/curl and in your solr configs.

On Wed, Jan 4, 2012 at 3:15 PM, Brian Lamb wrote:

> Hi Param,
>
> That's the method I'm switching over from. It seems that script works
> inefficiently with my set up as the data is spread out over multiple
> tables. I've considered creating a simple solr MySQL table just to maintain
> the solr data but I wanted to try out this PHP extension first.
>
> But thanks for the suggestion!
>
> Brian Lamb
>
> On Wed, Jan 4, 2012 at 2:58 PM, Sethi, Parampreet <
> parampreet.se...@teamaol.com> wrote:
>
> > Hi Brian,
> >
> > Not exactly solution to your problem. But it may help, you can run Solr
> > directly on top of your database, if your schema is simple manipulation
> of
> > the database fields. This way you only need to update the database and
> > solr index will be automatically updated with the latest data. I am using
> > this in production and it's working pretty neatly.
> >
> > Here are few helpful links:
> > http://wiki.apache.org/solr/DataImportHandler
> > http://www.params.me/2011/03/configure-apache-solr-14-with-mysql.html
> >
> > -param
> >
> > On 1/4/12 2:50 PM, "Brian Lamb"  wrote:
> >
> > >Hi all,
> > >
> > >I've been exploring http://www.php.net/manual/en/book.solr.php as a way
> > to
> > >maintain my index. I already have a PHP script that I use to update a
> > >database so I was hoping to be able to update the database at the same
> > >time
> > >I am updating the index.
> > >
> > >However, I've been getting the following error when trying to run
> > >$solr_client->commit();
> > >
> > >Unsuccessful update request. Response Code 0. (null)
> > >
> > >I've tried looking to see why I'm getting the error but I cannot find a
> > >reasonable explanation. My guess is that it is because my index is
> rather
> > >large (22 million records) and thus it is timing out or something like
> > >that
> > >but I cannot confirm that that is the case nor do I know how to fix it
> > >even
> > >if it were.
> > >
> > >Any help here would be greatly appreciated.
> > >
> > >Thanks,
> > >
> > >Brian Lamb
> >
> >
>


Re: Checking which terms are already available in the index from a list of terms

2012-01-04 Thread reeuv
Thanks Hoss for the valuable advice.

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Checking-which-terms-are-already-available-in-the-index-from-a-list-of-terms-tp3631699p3633226.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Checking which terms are already available in the index from a list of terms

2012-01-04 Thread Chris Hostetter

: I have a list of terms that I want to check which of them are already
: available in the index
: 
: for e.g I have a 
: which indexes the terms.
: 
: And I have list of words e.g. Honda, Civic, 2001. 

if the list you have is small relative hte total number of terms in the 
index, i would suggest facet.query...

  q=*:*&facet=true&facet.query={!term f=word}Honda&facet.query={!term 
f=word}Civic&...

...if the total number of terms in the index is small relateive the number 
of terms you want to check, then i would suggest using facet.field and 
comparing the results on the client...

  q=*:*&facet=true&facet.field=word&facet.limit=-1


-Hoss


Re: Problem with facet.fields

2012-01-04 Thread Chris Hostetter

: If I put : q=*:*&facet=true&facet.field=lom.classification.ddc.id
: => I have results for facet fields
: If I put : q=*:*&facet=true&facet.field=lom.educational.context
: => I have results for facet fields
: 
: But if I put : q=*:*&facet=true&facet.field=lom.classification.ddc.id
: &facet.field=lom.educational.context
: 
: I have only facet results for the first field. I tried to invert them and
: got also only results for the first field. It is like the the second field
: was ignored.

How are you doing these queries?  Are you using some sort of client 
library via some langauge, or are you pasting those URL snippets into a 
browser?  what does the "responseHeader" section of the results look like 
if you add echoParams=all to the URL?  what servlet container are you using?

My suspicion is that you are using some client library that doesn't 
understand multivalued URL params and is just putting them into a map, the 
responseHeader w/echoParams turned on will tell you exactly what Solr is 
getting.

I just tried this using the example schema in Solr 3.5 and it worked 
fine...

http://localhost:8983/solr/select?echoParams=all&q=*:*&facet=true&facet.field=lom.classification.ddc.id_s&facet.field=lom.educational.context_s

: Furthermore I tried :
: q=*:*&facet=true&facet.field=lom.classification.ddc.id&facet.field=foo
: => it works although the 'foo' field doesn't exist
: q=*:*&facet=true&facet.field=lom.classification.ddc.id&facet.field=foo
: => gives me an error telling me the 'foo' field doesn't exist.

i don't understand these last examples at all ... both of those lines are 
identical


-Hoss


Re: PHP/Solr library

2012-01-04 Thread Brian Lamb
Hi Param,

That's the method I'm switching over from. It seems that script works
inefficiently with my set up as the data is spread out over multiple
tables. I've considered creating a simple solr MySQL table just to maintain
the solr data but I wanted to try out this PHP extension first.

But thanks for the suggestion!

Brian Lamb

On Wed, Jan 4, 2012 at 2:58 PM, Sethi, Parampreet <
parampreet.se...@teamaol.com> wrote:

> Hi Brian,
>
> Not exactly solution to your problem. But it may help, you can run Solr
> directly on top of your database, if your schema is simple manipulation of
> the database fields. This way you only need to update the database and
> solr index will be automatically updated with the latest data. I am using
> this in production and it's working pretty neatly.
>
> Here are few helpful links:
> http://wiki.apache.org/solr/DataImportHandler
> http://www.params.me/2011/03/configure-apache-solr-14-with-mysql.html
>
> -param
>
> On 1/4/12 2:50 PM, "Brian Lamb"  wrote:
>
> >Hi all,
> >
> >I've been exploring http://www.php.net/manual/en/book.solr.php as a way
> to
> >maintain my index. I already have a PHP script that I use to update a
> >database so I was hoping to be able to update the database at the same
> >time
> >I am updating the index.
> >
> >However, I've been getting the following error when trying to run
> >$solr_client->commit();
> >
> >Unsuccessful update request. Response Code 0. (null)
> >
> >I've tried looking to see why I'm getting the error but I cannot find a
> >reasonable explanation. My guess is that it is because my index is rather
> >large (22 million records) and thus it is timing out or something like
> >that
> >but I cannot confirm that that is the case nor do I know how to fix it
> >even
> >if it were.
> >
> >Any help here would be greatly appreciated.
> >
> >Thanks,
> >
> >Brian Lamb
>
>


Re: PHP/Solr library

2012-01-04 Thread Sethi, Parampreet
Hi Brian,

Not exactly solution to your problem. But it may help, you can run Solr
directly on top of your database, if your schema is simple manipulation of
the database fields. This way you only need to update the database and
solr index will be automatically updated with the latest data. I am using
this in production and it's working pretty neatly.

Here are few helpful links:
http://wiki.apache.org/solr/DataImportHandler
http://www.params.me/2011/03/configure-apache-solr-14-with-mysql.html

-param

On 1/4/12 2:50 PM, "Brian Lamb"  wrote:

>Hi all,
>
>I've been exploring http://www.php.net/manual/en/book.solr.php as a way to
>maintain my index. I already have a PHP script that I use to update a
>database so I was hoping to be able to update the database at the same
>time
>I am updating the index.
>
>However, I've been getting the following error when trying to run
>$solr_client->commit();
>
>Unsuccessful update request. Response Code 0. (null)
>
>I've tried looking to see why I'm getting the error but I cannot find a
>reasonable explanation. My guess is that it is because my index is rather
>large (22 million records) and thus it is timing out or something like
>that
>but I cannot confirm that that is the case nor do I know how to fix it
>even
>if it were.
>
>Any help here would be greatly appreciated.
>
>Thanks,
>
>Brian Lamb



PHP/Solr library

2012-01-04 Thread Brian Lamb
Hi all,

I've been exploring http://www.php.net/manual/en/book.solr.php as a way to
maintain my index. I already have a PHP script that I use to update a
database so I was hoping to be able to update the database at the same time
I am updating the index.

However, I've been getting the following error when trying to run
$solr_client->commit();

Unsuccessful update request. Response Code 0. (null)

I've tried looking to see why I'm getting the error but I cannot find a
reasonable explanation. My guess is that it is because my index is rather
large (22 million records) and thus it is timing out or something like that
but I cannot confirm that that is the case nor do I know how to fix it even
if it were.

Any help here would be greatly appreciated.

Thanks,

Brian Lamb


Re: Optional filter queries

2012-01-04 Thread Chris Hostetter

: -filterMinutes:[* TO *] should return documents that do not have a value 
assigned to that field.

correct, but combining a negative filter with another filter can be 
confusing for people, you can't just use this...

  fq=filterMinutes:[* TO 50] -filterMinutes:[* TO *]

..because it finds hte set of all things under 50 minutes, and then 
excludes all things with any minutes at all.

you need to compute "the set of all things with no minutes" as a full 
independent clause in the filter query...

  fq=filterMinutes:[* TO 50] (*:* -filterMinutes:[* TO *])


If this is a type of query you know you are going to need to do often, you 
can make it faster by adding a "has_minutes" boolean field and 
doing...

  fq=filterMinutes:[* TO 50] has_minutes:false

-Hoss


Re: Checking which terms are already available in the index from a list of terms

2012-01-04 Thread lukai
There is some operator whose name is *OR*.

Thanks,

On 1/4/12, reeuv  wrote:
> I have a list of terms that I want to check which of them are already
> available in the index
>
> for e.g I have a 
> which indexes the terms.
>
> And I have list of words e.g. Honda, Civic, 2001.
>
> I want to check which of these terms are already available in the index. Is
> there any good efficient way of doing it rather than sending request one by
> one for the word Honda, Civic and 2001 ?
>
> Thanks.
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Checking-which-terms-are-already-available-in-the-index-from-a-list-of-terms-tp3631699p3631699.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: disable stemming on query parser.

2012-01-04 Thread lukai
What you mean is just disabling *stemming* in query phrase? If so, you
can just specify different analysis behavior for query and index. In
your *FieldType* configuration.

If you just want to *partially* disable stemming, like some query do
stemming, some dont. I recommend you to do pre-processing of the query
before you send them to Solr. Stemming algo is quite easy to copy out.

*Copy a new field* is not make sense, cuz it will impact your scoring function.


Thanks,


On 12/16/11, meghana  wrote:
> Hi All,   
>
> I am using Stemming in my solr , but i don't want to apply stemming always
> for each search request. i am thinking of to disable stemming on one
> specific query parser , can i do this?
>
> Any help much appreciated.
> Thanks in Advance
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/disable-stemming-on-query-parser-tp3591420p3591420.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Detecting query errors with SolrJ

2012-01-04 Thread Shawn Heisey
When doing Solr queries in a browser, it's pretty easy to see an HTTP 
error status and read the reason, but I would like to do the same thing 
in a deterministic way with SolrJ.  Can anyone point me to examples that 
show how to retrieve the HTTP status code and the reason for the error?  
I would like to inform the end user that there was a problem and offer 
ideas about how they might be able to fix it, rather than simply show an 
empty result grid.


Thanks,
Shawn



RE: How to index documents in SOLR running in Window XP envronment

2012-01-04 Thread Dyer, James
I've successfully used the windows distribution of curl from 
http://curl.haxx.se/download.html for this purpose.  This at least works when 
you put your xml in a text file and then use "curl http://host:port/solr/update 
-F stream.file=c:\filename.xml"  I do not think I was ever able to get "-F 
solr.body=" or "-F stream.body=" to work.  Good luck.

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311


-Original Message-
From: dsy99 [mailto:ds...@rediffmail.com] 
Sent: Wednesday, January 04, 2012 11:27 AM
To: solr-user@lucene.apache.org
Subject: How to index documents in SOLR running in Window XP envronment

Dear all,
I am facing problem to index data to SOLR running in window XP environment.
Can any one suggest the method similar to "curl" used in Unix environment?

Thank you in advance.

Divakar Yadav

--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-index-documents-in-SOLR-running-in-Window-XP-envronment-tp3632488p3632488.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: How to index documents in SOLR running in Window XP envronment

2012-01-04 Thread Sethi, Parampreet
Hi Divakar,

If you need to do simple Solr document indexing and know java, You can
write a java file along with data bean and use Solrj client for indexing.

Here's one simple tutorial:
http://www.params.me/2011/09/solrj-code-and-usage-example.html

Please provide more details on what you are trying to achieve.

-param

On 1/4/12 12:27 PM, "dsy99"  wrote:

>Dear all,
>I am facing problem to index data to SOLR running in window XP
>environment.
>Can any one suggest the method similar to "curl" used in Unix environment?
>
>Thank you in advance.
>
>Divakar Yadav
>
>--
>View this message in context:
>http://lucene.472066.n3.nabble.com/How-to-index-documents-in-SOLR-running-
>in-Window-XP-envronment-tp3632488p3632488.html
>Sent from the Solr - User mailing list archive at Nabble.com.



Re: How to index documents in SOLR running in Window XP envronment

2012-01-04 Thread Gora Mohanty
On Wed, Jan 4, 2012 at 10:57 PM, dsy99  wrote:
> Dear all,
> I am facing problem to index data to SOLR running in window XP environment.
> Can any one suggest the method similar to "curl" used in Unix environment?

I am sorry, but the above makes little sense, and gives people no basis to
reply to your message. What are you trying to index, and how? Individual
files, by using DIH, or what? You might wish to describe what you would
like to achieve.

I am not a Windows user, but I understand that curl is also available
for that antiquated platform. Please try searching Google to find it.

Reviewing http://wiki.apache.org/solr/UsingMailingLists might be of help
in formulating questions.

Regards,
Gora


Re: Generic RemoveDuplicatesTokenFilter

2012-01-04 Thread astubbs
That's exactly what I need. I'm using phonetic tokens on ngrams, and there's
lots of dupes. Can you submit it as a patch? What's the easiest way to get
this into my solr?

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Generic-RemoveDuplicatesTokenFilter-tp3581656p3632499.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: Solr, SQL Server's LIKE

2012-01-04 Thread Devon Baumgarten
Great suggestion! Thanks for keeping it simple for a complete Solr newbie.

I'm going to go try this right now.

Thanks!
Devon Baumgarten


-Original Message-
From: Shawn Heisey [mailto:s...@elyograg.org] 
Sent: Monday, January 02, 2012 12:30 PM
To: solr-user@lucene.apache.org
Subject: Re: Solr, SQL Server's LIKE

On 12/29/2011 3:51 PM, Devon Baumgarten wrote:
> N-Grams get me pretty great results in general, but I don't want the results 
> for this particular search to be fuzzy. How can I prevent the fuzzy matches 
> from appearing?
>
> Ex: If I search "Albatross" I want "Albert" to be excluded completely, rather 
> than having a low score.

To achieve this while using the ngram filter, just do the ngram analysis 
on the index side, but not on the query side.  If you do this, you'll 
likely need a maxGramSize larger than would normally be required (which 
will make the index larger), and you might need to use the LengthFilter too.

Thanks,
Shawn



Re: Problem with facet.fields

2012-01-04 Thread Sethi, Parampreet
Hi Marc,

It could be because of "." in the field name. Try doing url encoding of
"." and it should work.

"But if I put : q=*:*&facet=true&facet.field=lom.classification.ddc.id
&facet.field=lom.educational.context "


-param

On 1/4/12 10:27 AM, "Marc SCHNEIDER"  wrote:

>Hi,
>
>I'm quite sure I'm missing something but I'm getting mad with this
>problem :
>
>If I put : q=*:*&facet=true&facet.field=lom.classification.ddc.id
>=> I have results for facet fields
>If I put : q=*:*&facet=true&facet.field=lom.educational.context
>=> I have results for facet fields
>
>But if I put : q=*:*&facet=true&facet.field=lom.classification.ddc.id
>&facet.field=lom.educational.context
>
>I have only facet results for the first field. I tried to invert them and
>got also only results for the first field. It is like the the second field
>was ignored.
>
>Furthermore I tried :
>q=*:*&facet=true&facet.field=lom.classification.ddc.id&facet.field=foo
>=> it works although the 'foo' field doesn't exist
>q=*:*&facet=true&facet.field=lom.classification.ddc.id&facet.field=foo
>=> gives me an error telling me the 'foo' field doesn't exist.
>
>I'm running Solr 3.5
>
>Any idea about this weird thing?
>
>Thanks,
>Marc.



Problem with facet.fields

2012-01-04 Thread Marc SCHNEIDER
Hi,

I'm quite sure I'm missing something but I'm getting mad with this problem :

If I put : q=*:*&facet=true&facet.field=lom.classification.ddc.id
=> I have results for facet fields
If I put : q=*:*&facet=true&facet.field=lom.educational.context
=> I have results for facet fields

But if I put : q=*:*&facet=true&facet.field=lom.classification.ddc.id
&facet.field=lom.educational.context

I have only facet results for the first field. I tried to invert them and
got also only results for the first field. It is like the the second field
was ignored.

Furthermore I tried :
q=*:*&facet=true&facet.field=lom.classification.ddc.id&facet.field=foo
=> it works although the 'foo' field doesn't exist
q=*:*&facet=true&facet.field=lom.classification.ddc.id&facet.field=foo
=> gives me an error telling me the 'foo' field doesn't exist.

I'm running Solr 3.5

Any idea about this weird thing?

Thanks,
Marc.


Re: Query regarding solr custom sort order

2012-01-04 Thread Bernd Fehling

Hi,

I suggest using the following fieldType for your field:



Regards
Bernd

Am 04.01.2012 14:40, schrieb umaswayam:

Hi,

We want to sort our records based on some sequence which is like
1 2 3 4 5 6 7 8 9  10 11 12 13 14.

I am using Websphere commerce to retrieve data using solr. When we are
customizing the sort order/ option in wc-search.xml file then we are getting
the sort order as
1 10 11 12 13 14 2 3 4 5 6 7 8 9 like this.

As I guess the sort order is checking with first digit of all sequences&
based on that if they are same moving on to compare the next digit&  so on,
which is resulting on wrong sort output.

Can anyone put some thoughts on this or help me out if I am doing something
wrong here.

Thanks in advance
Uma Shankar





Re: Query regarding solr custom sort order

2012-01-04 Thread Sethi, Parampreet
Hi Uma,

Have you declared the type as integer for this field? In case, type is
some form of String (text, string etc.) the sorting will happen
lexicographically.

-param

On 1/4/12 8:40 AM, "umaswayam"  wrote:

>Hi,
>
>We want to sort our records based on some sequence which is like
>1 2 3 4 5 6 7 8 9  10 11 12 13 14.
>
>I am using Websphere commerce to retrieve data using solr. When we are
>customizing the sort order/ option in wc-search.xml file then we are
>getting
>the sort order as
>1 10 11 12 13 14 2 3 4 5 6 7 8 9 like this.
>
>As I guess the sort order is checking with first digit of all sequences &
>based on that if they are same moving on to compare the next digit & so
>on,
>which is resulting on wrong sort output.
>
>Can anyone put some thoughts on this or help me out if I am doing
>something
>wrong here.
>
>Thanks in advance
>Uma Shankar
>
>
>
>--
>View this message in context:
>http://lucene.472066.n3.nabble.com/Query-regarding-solr-custom-sort-order-
>tp3631854p3631854.html
>Sent from the Solr - User mailing list archive at Nabble.com.



Re: Query regarding solr custom sort order

2012-01-04 Thread Erik Hatcher
You're using a string field type, I imagine.  Use a numeric field type instead.

wc-search.xml?   That's not a solr config file; must be something specific to 
your app.

Erik

On Jan 4, 2012, at 08:40 , umaswayam wrote:

> Hi,
> 
> We want to sort our records based on some sequence which is like
> 1 2 3 4 5 6 7 8 9  10 11 12 13 14.
> 
> I am using Websphere commerce to retrieve data using solr. When we are
> customizing the sort order/ option in wc-search.xml file then we are getting
> the sort order as
> 1 10 11 12 13 14 2 3 4 5 6 7 8 9 like this.
> 
> As I guess the sort order is checking with first digit of all sequences &
> based on that if they are same moving on to compare the next digit & so on,
> which is resulting on wrong sort output.
> 
> Can anyone put some thoughts on this or help me out if I am doing something
> wrong here.
> 
> Thanks in advance
> Uma Shankar
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Query-regarding-solr-custom-sort-order-tp3631854p3631854.html
> Sent from the Solr - User mailing list archive at Nabble.com.



Query regarding solr custom sort order

2012-01-04 Thread umaswayam
Hi,

We want to sort our records based on some sequence which is like
1 2 3 4 5 6 7 8 9  10 11 12 13 14.

I am using Websphere commerce to retrieve data using solr. When we are
customizing the sort order/ option in wc-search.xml file then we are getting
the sort order as
1 10 11 12 13 14 2 3 4 5 6 7 8 9 like this.

As I guess the sort order is checking with first digit of all sequences &
based on that if they are same moving on to compare the next digit & so on,
which is resulting on wrong sort output.

Can anyone put some thoughts on this or help me out if I am doing something
wrong here.

Thanks in advance
Uma Shankar



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Query-regarding-solr-custom-sort-order-tp3631854p3631854.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Merging results of facet fields

2012-01-04 Thread Marc SCHNEIDER
Hi Andy and Erik,

Thanks for for your answers it really helped me!

Marc.

On Wed, Jan 4, 2012 at 2:15 PM, Erik Hatcher  wrote:

> I'd recommend what Andy said, but if all you're interested in is a single
> term combined, you can do 
> and you'll get the "merged" count.
>
>Erik
>
> On Jan 4, 2012, at 07:51 , Andrew Ingram wrote:
>
> > Hi Marc,
> >
> > I'd probably have another field called "keywords" (or something) that I
> copy all the values into using copyfields, then just facet (and therefore
> filter) on that field instead.
> >
> > If there were a way to do it the way you're asking (there might be, I
> don't know), there's no guarantee that the total of 23 is correct. If
> there's overlap ie a document having both product and tag values of
> "computer", the merged total should actually be less than 23.
> >
> > - Andy
> >
> > On 4 Jan 2012, at 12:45, Marc SCHNEIDER wrote:
> >
> >> Hello,
> >>
> >> I have two fields 'product' and 'tag'.
> >> Executing this query
> q=*:*&facet=true&facet.field=product&facet.field=tag
> >> gives me this result :
> >>
> >> 
> >> 
> >>16
> >>...
> >> 
> >> 
> >>7
> >>...
> >> 
> >> 
> >>
> >> Is there a way to group the results by value ie getting  >> name="computer">23, regardless of the field names?
> >>
> >> Thanks in advance,
> >> Marc.
> >
> >
>
>


Do Hignlighting + proximity using surround query parser

2012-01-04 Thread reachpratik
Hello,
I am not able to do highlighting with surround query parser on the returned
results.
I have tried the highlighting component but it does not return highlighted
results.

Any suggestions would help.


--
View this message in context: 
http://lucene.472066.n3.nabble.com/Do-Hignlighting-proximity-using-surround-query-parser-tp3631827p3631827.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: disable stemming on query parser.

2012-01-04 Thread meghana
Hi,

Can i do like.. stemmed match should score a lower then non-stemmed (exact
word) match  ? 

Thanks
Meghana

--
View this message in context: 
http://lucene.472066.n3.nabble.com/disable-stemming-on-query-parser-tp3591420p3631826.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Merging results of facet fields

2012-01-04 Thread Erik Hatcher
I'd recommend what Andy said, but if all you're interested in is a single term 
combined, you can do  and you'll 
get the "merged" count.

Erik

On Jan 4, 2012, at 07:51 , Andrew Ingram wrote:

> Hi Marc,
> 
> I'd probably have another field called "keywords" (or something) that I copy 
> all the values into using copyfields, then just facet (and therefore filter) 
> on that field instead.
> 
> If there were a way to do it the way you're asking (there might be, I don't 
> know), there's no guarantee that the total of 23 is correct. If there's 
> overlap ie a document having both product and tag values of "computer", the 
> merged total should actually be less than 23.
> 
> - Andy
> 
> On 4 Jan 2012, at 12:45, Marc SCHNEIDER wrote:
> 
>> Hello,
>> 
>> I have two fields 'product' and 'tag'.
>> Executing this query q=*:*&facet=true&facet.field=product&facet.field=tag
>> gives me this result :
>> 
>> 
>> 
>>16
>>...
>> 
>> 
>>7
>>...
>> 
>> 
>> 
>> Is there a way to group the results by value ie getting > name="computer">23, regardless of the field names?
>> 
>> Thanks in advance,
>> Marc.
> 
> 



Re: Merging results of facet fields

2012-01-04 Thread Andrew Ingram
Hi Marc,

I'd probably have another field called "keywords" (or something) that I copy 
all the values into using copyfields, then just facet (and therefore filter) on 
that field instead.

If there were a way to do it the way you're asking (there might be, I don't 
know), there's no guarantee that the total of 23 is correct. If there's overlap 
ie a document having both product and tag values of "computer", the merged 
total should actually be less than 23.

- Andy

On 4 Jan 2012, at 12:45, Marc SCHNEIDER wrote:

> Hello,
> 
> I have two fields 'product' and 'tag'.
> Executing this query q=*:*&facet=true&facet.field=product&facet.field=tag
> gives me this result :
> 
> 
>  
> 16
> ...
>  
>  
> 7
> ...
>  
> 
> 
> Is there a way to group the results by value ie getting  name="computer">23, regardless of the field names?
> 
> Thanks in advance,
> Marc.




Merging results of facet fields

2012-01-04 Thread Marc SCHNEIDER
Hello,

I have two fields 'product' and 'tag'.
Executing this query q=*:*&facet=true&facet.field=product&facet.field=tag
gives me this result :


  
 16
 ...
  
  
 7
 ...
  


Is there a way to group the results by value ie getting 23, regardless of the field names?

Thanks in advance,
Marc.


Checking which terms are already available in the index from a list of terms

2012-01-04 Thread reeuv
I have a list of terms that I want to check which of them are already
available in the index

for e.g I have a 
which indexes the terms.

And I have list of words e.g. Honda, Civic, 2001. 

I want to check which of these terms are already available in the index. Is
there any good efficient way of doing it rather than sending request one by
one for the word Honda, Civic and 2001 ?

Thanks.

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Checking-which-terms-are-already-available-in-the-index-from-a-list-of-terms-tp3631699p3631699.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: charFilter PatternReplaceCharFilterFactory and highlighting

2012-01-04 Thread darul
Well I guess may be a bug somewhere 

https://issues.apache.org/jira/browse/LUCENE-2208

--
View this message in context: 
http://lucene.472066.n3.nabble.com/charFilter-PatternReplaceCharFilterFactory-and-highlighting-tp3629699p3631571.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: charFilter PatternReplaceCharFilterFactory and highlighting

2012-01-04 Thread darul
Some of our path in indexed content may contains some words matching query,
what we do not expect, that is why I have applied a CharFilter to skip it.

Here is example of content before filtering :



After applying regexp filter I have provided in my previous thread, it
should look like, shouldn't it (skip links path in indexation ?) :



I have also made query tests and get no results matching when looking for
"*uploads*" or "*content*", what is our expected behaviour.

Problem is when I activate highlight and search for "*word*", it throws
exception.




--
View this message in context: 
http://lucene.472066.n3.nabble.com/charFilter-PatternReplaceCharFilterFactory-and-highlighting-tp3629699p3631367.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Optional filter queries

2012-01-04 Thread Tanguy Moal
I think I misunderstood your issue, what I said applies only to sorting 
on that field.


As soon as you perform a filter by querying a particuliar field, 
documents without a value in that field are filtered out.


Christopher is right in is answer, and therefor by ORing both filters 
you should get the results-set you were expected.


You might then want to sort on that field, and this time my previous 
answer could help ;-).


Sorry for confusing you!

Le 04/01/2012 09:32, Tanguy Moal a écrit :

Hello,

If the number stored is not in a string field, you will need solr >= 
3.5 to perform what you want.


Since solr 3.5 it's possible to set the attribute sortMissingLast or 
sortMissingFirst to true, within the field definition (an example is 
available in the schema.xml provided with solr 3.5)


Hope this helps,

--
Tanguy

Le 04/01/2012 06:33, Christopher Childs a écrit :
-filterMinutes:[* TO *] should return documents that do not have a 
value assigned to that field.


On Jan 3, 2012, at 11:30 PM, Allistair Crossley wrote:


Evening all,

A subset of my documents have a field, filterMinutes, that some 
other documents do not. filterMinutes stores a number.


I often issue a query that contains a filter query range, e.g.

q=filterMinutes:[* TO 50]

I am finding that adding this query excludes all documents that do 
not feature this field, but what I want is for the filter query to 
act upon those documents that do have the field but also to return 
documents that don't have it at all.


Is this a possibility?

Best,

Allistair






Re: Optional filter queries

2012-01-04 Thread Tanguy Moal

Hello,

If the number stored is not in a string field, you will need solr >= 3.5 
to perform what you want.


Since solr 3.5 it's possible to set the attribute sortMissingLast or 
sortMissingFirst to true, within the field definition (an example is 
available in the schema.xml provided with solr 3.5)


Hope this helps,

--
Tanguy

Le 04/01/2012 06:33, Christopher Childs a écrit :

-filterMinutes:[* TO *] should return documents that do not have a value 
assigned to that field.

On Jan 3, 2012, at 11:30 PM, Allistair Crossley wrote:


Evening all,

A subset of my documents have a field, filterMinutes, that some other documents 
do not. filterMinutes stores a number.

I often issue a query that contains a filter query range, e.g.

q=filterMinutes:[* TO 50]

I am finding that adding this query excludes all documents that do not feature 
this field, but what I want is for the filter query to act upon those documents 
that do have the field but also to return documents that don't have it at all.

Is this a possibility?

Best,

Allistair