Re: Setting a Threshold of a sortable field to filter the result?

2008-04-01 Thread Erik Hatcher

I'll let the example schema.xml speak for itself:






omitNorms="true"/>




sortMissingLast="true" omitNorms="true"/>
sortMissingLast="true" omitNorms="true"/>
sortMissingLast="true" omitNorms="true"/>
sortMissingLast="true" omitNorms="true"/>





On Apr 1, 2008, at 12:09 AM, Vinci wrote:


Hi,

One more thing: which numerical data type I should use, sfloat or  
float, fot

the fq parameter?

Thank you,
Vinci


hossman wrote:


:
: How can I set a threshold value of a field so that I can filter the
result
: which is lower than the threshold? By the schema.xml or set by the
query?

fq=your_field_name:[* TO your_max_value]

or

fq=your_field_name:[your_min_value TO *]

depending on wether you want a minimum or maximum filter.




-Hoss





--
View this message in context: http://www.nabble.com/Setting-a- 
Threshold-of-a-sortable-field-to-filter-the-result-- 
tp16367336p16411382.html

Sent from the Solr - User mailing list archive at Nabble.com.




Re: Solved! Solr interprets UTF-8 as ISO-8859-1

2008-04-01 Thread Daniel Löfquist
That did the trick. I actually figured it out on my own 10 minutes after 
I posted to the mailinglist. Typical ;-)

Thanks for the help anyway everybody!

//Daniel

Uwe Klosa wrote:

You should set uriEncoding="UTF-8" in your application server. For tomcat
you can do that in the server.xml. For Glassfish you have to create a
sun-web.xml containing the according parameters. Yoy r application server
should provide a similar mechanism.

Uwe

On Mon, Mar 31, 2008 at 4:32 PM, Daniel Löfquist <
[EMAIL PROTECTED]> wrote:


Hello,

We're building a webapplication that uses Solr for searching and I've
come upon a problem that I can't seem to get my head around.

We have a servlet that accepts input via XML-RPC and based on that input
constructs the correct URL to perform a search with the Solr-servlet.

I know that the call to Solr (the URL) from our servlet looks like this
(which is what it should look like):

http://myserver:8080/solrproducts/select/?q=all_SV:ljusbl
å+status:online&fl=id%2Cartno%2Ctitle_SV%2CtitleSort_SV%2Cdescription_SV%2C&sort=titleSort_SV+asc,id+asc&start=0&q.op=AND&rows=25

But Solr reports the input-fields (the GET-variables in the URL) as:

INFO: /select/

fl=id,artno,title_SV,titleSort_SV,description_SV,&sort=titleSort_SV+asc,id+asc&start=0&q=all_SV:ljusblå+status:online&q.op=AND&rows=25

which is all fine except where it says "ljusblå". Apparently Solr is
interpreting the UTF-8 string "ljusblå" as ISO-8859-1 and thus creates
this garbage that makes the search return 0 when it should in reality
return 3 hits.

All other searches that don't use special characters work 100% fine.

I'm new to Solr so I'm not sure what I'm doing wrong here. Can anybody
help me out and point me in the direction of a solution?

Sincerely,

Daniel Löfquist






--
Daniel Löfquist
Application Manager / Software Engineer

CDON.COM
Bergsgatan 20, Box 385, SE 201 23 Malmö, Sweden

Office: +46 40 601 61 00
Direct: +46 40 601 61 16
Mobile: +46 702 92 21 75
Fax: +46 40 601 61 20
E-mail: [EMAIL PROTECTED] 

CDON.COM 

Confidentiality
Information contained in this e-mail is intended for the use of the
addressee only, and is confidential. Any dissemination, distribution,
copying or use of this communication without prior permission of
the addressee is strictly prohibited. If you are not the intended
addressee you must delete this e-mail and its attachments.


Re: stored and indexed in schema

2008-04-01 Thread Erik Hatcher


On Mar 31, 2008, at 11:56 PM, Vinci wrote:
I would like to ask, if I set a field to be indexed but not stored,  
I can

retrieved the document but cannot retrieve this field?


That's correct.  By definition :)

If I have large field that I want to index but I am not suppose to  
show them
to user (The origin content stored in another processed document  
where I am

using another field in Solr to point to their location...I throw the
retrieval job to the server :P), will I get faster respond even the  
query

doesn't ask solr to return this large field?


You'll get better response in that Solr won't be taking the time to  
retrieve the large stored field, writing it to the response, and the  
client-side parsing that data, sure.


Erik



Re: Can We append a field to the response that is not in the index but computed at runtime.

2008-04-01 Thread Umar Shah
thanks ryan

seems like this would be helpful.
will try it out.

thanks again.
-umar


On Tue, Apr 1, 2008 at 12:13 AM, Chris Hostetter <[EMAIL PROTECTED]>
wrote:

>
> : > 2. Augment the documents with a field value -- this is a bit more
> : > complex and runs the risk of name collisions with fields in your
> : > documents.  You can pull the docLIst out from the response and add
> : > fields to each document.
> :
> : this seems more appropriate,
> : I'm okay, to resolve name collision , how do I add the  field.. any
> specific
> : methods to do that?
>
> I *think* the missing step here is that while DocLists can't easily be
> modified, new SolrDocument and SolrDocumentList classes have been
> added since 1.2.  Solr by defualt doesn't use them, but the built in Solr
> ResponseWriters can output them, so your custom component can build a
> SolrDocumentList bsed on the DocList, and add whatever fields you want.
>
> I'm not sure if there are any help methods to do the
> DocList->SolrDocumentList conversion.
>
> (Ryan: keep my honest if this isn't what you had in mind)
>
>
>
>
> -Hoss
>
>


Re: How to handle multiple application?

2008-04-01 Thread Ryan McKinley

You *may* want to consider MultiCore:
http://wiki.apache.org/solr/MultiCore

but it may still be more appropriate to install multiple instances.


On Apr 1, 2008, at 2:40 AM, Bhavin Pandya wrote:
I have configured solr instance for one of my application in which  
there is one master server and 3 slave server.


I want to add one more application in same solr instance ? is it  
possible ? or i need to run multiple instance of solr.


please help.

Bhavin pandya
Software engineer,
Rediff.com India Ltd,




custom request handler; standard vs dismax

2008-04-01 Thread Matt Mitchell
Hi,

I recently started playing with the dismax handler and custom request
handlers. When using the solr.StandardRequestHandler class, I get the
response that I want; lots of facet values. When I switch to the dismax
class, I get none. I've posted my request handler definitions here. Am I
missing something totally obvious?

Thanks,
Matt

p.s. using the latest/nightly build of solr

* an example url:

http://localhost:8983/solr/select/?facet.limit=6&wt=ruby&rows=0&facet=true&facet.mincount=1&facet.offset=0&q=*:*&fl=*,score&qt=catalog&facet.missing=true&facet.field=source_facet&facet.sort=true


* no facet values with this:


*:*
on



* lots of facet values with this:


*:*
on



Re: matching exact/whole phrase

2008-04-01 Thread Daniel Papasian

Sandeep Shetty wrote:

Hi people,

I am looking to provide exact phrase match, along with the full text
search with solr.  I want to achieve the same effect in solr rather
than use a separate SQL query. I want to do the following as an
example

The indexed field has the text "car repair" (without the double
quotes)  for a document and I want this document to come in the
search result only if someone searches for "car repair". The document
should not show up for "repair" and "car" searches.

Is it possible to do this type of exact phrase matching if needed
with solr itself?


It sounds like you want to do an exact string match, and not a text 
match, so I don't think there's anything complex you'd need to do... 
just store the field with "car repair" as type="string" and do all of 
the literal searches you want.


But if you are working off a field that contains something beyond the 
exact match of what you want to search for, you'll just need to define a 
new field type and use only the analysis filters that you need, and 
you'll have to think more about what you need if that's the case.


Daniel


matching exact/whole phrase

2008-04-01 Thread Sandeep Shetty
Hi people,

I am looking to provide exact phrase match, along with the full text search 
with solr.  I want to achieve the same effect in solr rather than use a 
separate SQL query. I want to do the following as an example

The indexed field has the text "car repair" (without the double quotes)  for a 
document and I want this document to come in the search result only if someone 
searches for "car repair". The document should not show up for "repair" and 
"car" searches.

Is it possible to do this type of exact phrase matching if needed with solr 
itself?

Thanks in advance

Regards,
Sandeep




Sandeep Shetty
Technical Development Manager

Touch Local
89 Albert Embankment, London, SE1 7TP, UK
D: 020 7840 4335
E: [EMAIL PROTECTED]
T: 020 7840 4300
F: 020 7840 4301 

This email is confidential and may also be privileged. If you are not the 
intended recipient please notify us immediately by calling 020 7840 4300 or 
email [EMAIL PROTECTED] You should not copy it or use it for any purpose nor 
disclose its contents to any other person. Touch Local Ltd cannot accept 
liability for statements made which are clearly the sender's own and are not 
made on behalf of the firm.
Registered in England and Wales. Registration Number: 2885607 VAT Number: 
GB896112114

Help to save some trees. Print e-mails only if you really need to.

RE: matching exact/whole phrase

2008-04-01 Thread Sandeep Shetty
That was the answer I was looking for, I will try that one out

Thanks Daniel

-Original Message-
From: Daniel Papasian [mailto:[EMAIL PROTECTED]
Sent: 01 April 2008 16:03
To: solr-user@lucene.apache.org
Subject: Re: matching exact/whole phrase

Sandeep Shetty wrote:
> Hi people,
>
> I am looking to provide exact phrase match, along with the full text
> search with solr.  I want to achieve the same effect in solr rather
> than use a separate SQL query. I want to do the following as an
> example
>
> The indexed field has the text "car repair" (without the double
> quotes)  for a document and I want this document to come in the
> search result only if someone searches for "car repair". The document
> should not show up for "repair" and "car" searches.
>
> Is it possible to do this type of exact phrase matching if needed
> with solr itself?

It sounds like you want to do an exact string match, and not a text
match, so I don't think there's anything complex you'd need to do...
just store the field with "car repair" as type="string" and do all of
the literal searches you want.

But if you are working off a field that contains something beyond the
exact match of what you want to search for, you'll just need to define a
new field type and use only the analysis filters that you need, and
you'll have to think more about what you need if that's the case.

Daniel

Sandeep Shetty
Technical Development Manager

Touch Local
89 Albert Embankment, London, SE1 7TP, UK
D: 020 7840 4335
E: [EMAIL PROTECTED]
T: 020 7840 4300
F: 020 7840 4301 

This email is confidential and may also be privileged. If you are not the 
intended recipient please notify us immediately by calling 020 7840 4300 or 
email [EMAIL PROTECTED] You should not copy it or use it for any purpose nor 
disclose its contents to any other person. Touch Local Ltd cannot accept 
liability for statements made which are clearly the sender's own and are not 
made on behalf of the firm.
Registered in England and Wales. Registration Number: 2885607 VAT Number: 
GB896112114

Help to save some trees. Print e-mails only if you really need to.


Re: custom request handler; standard vs dismax

2008-04-01 Thread Erik Hatcher
I just chatted with Matt about this.  It took me a few seconds  
(thinking this might be a browser caching issue without looking at  
the actual query), but the issue is that dismax does not support the  
*:* syntax.  Removing the q parameter altogether does the trick, with  
it falling back to the q.alt standard Lucene parsing.


Erik


On Apr 1, 2008, at 10:41 AM, Matt Mitchell wrote:

Hi,

I recently started playing with the dismax handler and custom request
handlers. When using the solr.StandardRequestHandler class, I get the
response that I want; lots of facet values. When I switch to the  
dismax
class, I get none. I've posted my request handler definitions here.  
Am I

missing something totally obvious?

Thanks,
Matt

p.s. using the latest/nightly build of solr

* an example url:

http://localhost:8983/solr/select/? 
facet.limit=6&wt=ruby&rows=0&facet=true&facet.mincount=1&facet.offset= 
0&q=*:*&fl=*,score&qt=catalog&facet.missing=true&facet.field=source_fa 
cet&facet.sort=true



* no facet values with this:


*:*
on



* lots of facet values with this:


*:*
on





Re: stored and indexed in schema

2008-04-01 Thread Vinci

Hi,

Thank you for your reply, It look like I will have some benefit but I will
also lose the highlighter/summary functionary, it that right?

Thank you,
Vinci



Erik Hatcher wrote:
> 
> 
> On Mar 31, 2008, at 11:56 PM, Vinci wrote:
>> I would like to ask, if I set a field to be indexed but not stored,  
>> I can
>> retrieved the document but cannot retrieve this field?
> 
> That's correct.  By definition :)
> 
>> If I have large field that I want to index but I am not suppose to  
>> show them
>> to user (The origin content stored in another processed document  
>> where I am
>> using another field in Solr to point to their location...I throw the
>> retrieval job to the server :P), will I get faster respond even the  
>> query
>> doesn't ask solr to return this large field?
> 
> You'll get better response in that Solr won't be taking the time to  
> retrieve the large stored field, writing it to the response, and the  
> client-side parsing that data, sure.
> 
>   Erik
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/stored-and-indexed-in-schema-tp16411090p16419438.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: stored and indexed in schema

2008-04-01 Thread Erik Hatcher


On Apr 1, 2008, at 1:35 PM, Vinci wrote:
Thank you for your reply, It look like I will have some benefit but  
I will

also lose the highlighter/summary functionary, it that right?


Ya can't highlight what you don't have.  So that's true.

I think eventually it would be handy for Solr to allow the client to  
post in some text to be highlighted, but it does not currently  
support that.


Erik




Thank you,
Vinci



Erik Hatcher wrote:



On Mar 31, 2008, at 11:56 PM, Vinci wrote:

I would like to ask, if I set a field to be indexed but not stored,
I can
retrieved the document but cannot retrieve this field?


That's correct.  By definition :)


If I have large field that I want to index but I am not suppose to
show them
to user (The origin content stored in another processed document
where I am
using another field in Solr to point to their location...I throw the
retrieval job to the server :P), will I get faster respond even the
query
doesn't ask solr to return this large field?


You'll get better response in that Solr won't be taking the time to
retrieve the large stored field, writing it to the response, and the
client-side parsing that data, sure.

Erik





--
View this message in context: http://www.nabble.com/stored-and- 
indexed-in-schema-tp16411090p16419438.html

Sent from the Solr - User mailing list archive at Nabble.com.




Re: synonyms

2008-04-01 Thread Otis Gospodnetic
Concretely, it would be good to know how your Portuguese Stemmer is 
different/better than Porter's.

Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch

- Original Message 
From: Chris Hostetter <[EMAIL PROTECTED]>
To: solr-user@lucene.apache.org
Sent: Monday, March 31, 2008 6:17:48 PM
Subject: Re: synonyms


: We've implemented a PortugueseSteemer. We want to let it available for
: everyone. Where can I commit it ?

If it's just a Stemmer that has no Solr dependencies (or a Stemmer built 
as a TokenFilter) the best thing to do is contribute it to the 
Lucene-Java project...

http://wiki.apache.org/lucene-java/HowToContribute

...the best place for it to live would be in the contrib/analysis package.

make sure to note in the issue how it is differnet/better then the 
existing Stemmers for Portuguese so people can differentiate it.



-Hoss






Re: Indexing a word in url

2008-04-01 Thread Chris Hostetter

: Actually I want to use anything that is not alphabet or digit to be the
: separator - anything between them will be a word (so that I can use the URL
: fragment to see what is indexed about this site)...any suggestion?

In addition to Mike's suggestion of trying out the WordDelimiterFilter, 
take a look at the PatternTokenizerFactory.



-Hoss



Re: Multiple unique field?

2008-04-01 Thread Chris Hostetter

: I want to set 2 field that are unique for different kind of searching. Does
: it possible?

not unless you enforce it yourself -- there isn't anything built in to 
Solr to do this with the exception of the uniqueKey field.

There is an UpdateRequestProcessorFactory hook that you can implement to 
do arbitrary logic for each update command (regardless of wether the 
update comes from XML, CSV, or something else) ... you could add whatever 
uniqueness logic you want there.



-Hoss



Re: sorting on aggregate averages

2008-04-01 Thread Chris Hostetter
: I am computing a sorted rank list and returning a slice (for pagination) but
: have to recompute the result for each request, although the actual q
: parameter and fq would be cached but not the sorted list which I could cache
: to reuse on subsequent requests.
: 
: I might have a look at the caching also, any suggestions in this regard.

Take a look at "User/Generic Caches" here...

http://wiki.apache.org/solr/SolrCaching

Your custom handler/component can use SolrIndexSearcher.getCache to see if 
a cache with a specific name has been defined, if it has you can do the 
normal get/put operations on it. The cache will worry about expulsion of 
items if it's full (the only Impl that comes with Solr is an LRUCache, but 
you could write your own if you want), and SolrCore will worry about 
giving you a new cache instance when a new reader is opened.  If you 
implement a CacheRegenerator (and configure it for this cache) then you 
can put whatever custome code in that you want for autowarming entries in 
the cache based on the keys/values of the old cache (ie: warm all the 
keys, warm the "first" N keys, warm all the keys whose values indicate 
they were expensive to compute, etc)

(just make sure your custom handler/component can function ok even if the 
cache doesn't exist, or if there are cache misses even when you don't 
expect them -- it is after all just a cache, good code should be able to 
function (slowly) without it if it's turned off.)

-Hoss



Re: Multiple unique field?

2008-04-01 Thread Vinci

Hi,

Thank you for your reply
In other word, can I set 2 unique key field?

Thank you,
Vinci


hossman wrote:
> 
> 
> : I want to set 2 field that are unique for different kind of searching.
> Does
> : it possible?
> 
> not unless you enforce it yourself -- there isn't anything built in to 
> Solr to do this with the exception of the uniqueKey field.
> 
> There is an UpdateRequestProcessorFactory hook that you can implement to 
> do arbitrary logic for each update command (regardless of wether the 
> update comes from XML, CSV, or something else) ... you could add whatever 
> uniqueness logic you want there.
> 
> 
> 
> -Hoss
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Multiple-unique-field--tp16367339p16441192.html
Sent from the Solr - User mailing list archive at Nabble.com.