Alpha numeric sort problem

2008-02-14 Thread Mahesh Udupa
Hello,

I have following entry in my title list:

Content1
Content2
Content3
Content4
Content5

If I try to Sort it in ascending or descending order, I am getting same
order.

I am using following alphaOnlySort field and text.
Please let me know if I miss anything here.

Thanks in advance for looking into this issue.

-Thanks and Regards,
kmu


 
  








  



 
  







  
  







  





  







  



Re: Alpha numeric sort problem

2008-02-14 Thread Mahesh Udupa
Thanks Erick for your quick response.

Even I tried with *text*  Field type. But no use.
As splitOnCaseChange="1", do we have splitOnLetterToNumberChange or
something like that?

Thanks in advance
kmu




On Thu, Feb 14, 2008 at 9:50 PM, Erick Erickson <[EMAIL PROTECTED]>
wrote:

> I admit I know little about SOLR, but wouldn't an AlphaOnlySorter ignore
> the digits?
>
> Erick
>
> On Thu, Feb 14, 2008 at 3:51 AM, Mahesh Udupa <[EMAIL PROTECTED]>
> wrote:
>
> > Hello,
> >
> > I have following entry in my title list:
> >
> > Content1
> > Content2
> > Content3
> > Content4
> > Content5
> >
> > If I try to Sort it in ascending or descending order, I am getting same
> > order.
> >
> > I am using following alphaOnlySort field and text.
> > Please let me know if I miss anything here.
> >
> > Thanks in advance for looking into this issue.
> >
> > -Thanks and Regards,
> > kmu
> >
> >
> >   > sortMissingLast="true" omitNorms="true">
> >  
> >
> >
> >
> >
> >
> >
> >
> > >pattern="([^a-z])" replacement="" replace="all"
> >/>
> >  
> >
> >
> >
> >   > positionIncrementGap="100">
> >  
> >
> >
> >
> > > splitOnCaseChange="1" generateWordParts="1" generateNumberParts="0"
> > catenateWords="1" catenateNumbers="0" catenateAll="1"/>
> >
> >
> >
> >  
> >  
> >
> > > ignoreCase="true" expand="true"/>
> >
> > > splitOnCaseChange="1" generateWordParts="1" generateNumberParts="0"
> > catenateWords="1" catenateNumbers="0" catenateAll="1"/>
> >
> >
> >
> >  
> >
> >
> >
> >
> > > positionIncrementGap="100" >
> >  
> >
> > > ignoreCase="true" expand="false"/>
> >
> > > generateWordParts="0" generateNumberParts="0" catenateWords="1"
> > catenateNumbers="1" catenateAll="0"/>
> >
> >
> >
> >  
> >
> >
>
>


Re: Alpha numeric sort problem

2008-02-15 Thread Mahesh Udupa
Thanks Yonik,

It works fine. But sort is *case sensitive. *
And also,
If my String contains some white space(or - or any other special char) then
failed to sort, with following error.

INFO: /select/ 
version=2.2&rows=20&fl=rcid,status,categoryid,cmprice_value,cmprice_model,cmprice_noofdays,cmprice_nooftimes,cmprice_freqocc,cmprice_startdate,cmprice_enddate,title,devname,category,cmprice,shortdesc,ctype,score&start=0&q=%2Bstatus:published+%2Bplanid:1;title+asc
0 4
Feb 15, 2008 1:40:47 PM org.apache.solr.core.SolrException log
SEVERE: java.lang.RuntimeException: there are more terms than documents in
field "title", but it's impossible to sort on tokenized fields

I have used title as follows



So how can I make sure that sort is case in-sensitive, works for special
chars and numeric fields?

Sorry again, I am new to Solr. please provide your valid input.

Thanks in advance
-kmu



On Fri, Feb 15, 2008 at 11:08 AM, Yonik Seeley <[EMAIL PROTECTED]> wrote:

> On Thu, Feb 14, 2008 at 10:45 PM, Mahesh Udupa <[EMAIL PROTECTED]>
> wrote:
> >  Even I tried with *text*  Field type. But no use.
> >  As splitOnCaseChange="1", do we have splitOnLetterToNumberChange or
> >  something like that?
>
> Sorting requires a single token in the field (you want to sort on the
> whole value).  Try type "string".
>
> -Yonik
>


Re: Alpha numeric sort problem

2008-02-17 Thread Mahesh Udupa
Thanks Yonik,

I was using example schema.xml, in that alphaOnlySort FieldType contains
following analyzer.


  








  


Due to last filter class, I could not sort any field other than alphabets.
I removed that, it is perfectly working as we expect.

Thank you very much for your support.
-kmu


On Feb 15, 2008 11:49 PM, Yonik Seeley <[EMAIL PROTECTED]> wrote:

> On Fri, Feb 15, 2008 at 3:36 AM, Mahesh Udupa <[EMAIL PROTECTED]>
> wrote:
> > Thanks Yonik,
> >
> >  It works fine. But sort is *case sensitive. *
> >  And also,
> >  If my String contains some white space(or - or any other special char)
> then
> >  failed to sort, with following error.
> >
> >  INFO: /select/ version=2.2&rows=20&fl=rcid
> ,status,categoryid,cmprice_value,cmprice_model,cmprice_noofdays,cmprice_nooftimes,cmprice_freqocc,cmprice_startdate,cmprice_enddate,title,devname,category,cmprice,shortdesc,ctype,score&start=0&q=%2Bstatus:published+%2Bplanid:1;title+asc
> >  0 4
> >  Feb 15, 2008 1:40:47 PM org.apache.solr.core.SolrException log
> >  SEVERE: java.lang.RuntimeException: there are more terms than documents
> in
> >  field "title", but it's impossible to sort on tokenized fields
> >
> >  I have used title as follows
> >  
> >  
> >
> >  So how can I make sure that sort is case in-sensitive, works for
> special
> >  chars and numeric fields?
>
> Make a custom fieldType, starting with the TextField type and
> specifying the analyzer to use a keyword tokenizer followed by a
> lowercase filter.  The do the copyField (as you have done above).
> Then actually sort by the title_exact field (your example query shows
> you still sorting by "title").
>
> You probably want to use a separate sort parameter:  sort=text_exact desc
>
> -Yonik
>


Field Search

2008-02-18 Thread Mahesh Udupa
Hi,

I have a content with *title* as "*Advertise*" under a *category* "*Sales*"
And also, I have 3 other contents with *titles "{TV, Web,Radio}"*
under a *category
"Advertise"*
**
Now, if I try to search for,
*title:Advertise --- * I am getting following results:
==
Title ---   Category
==
Advertise  ---   Sales
TV   ---   Advertise
 Radio   ---   Advertise
 Web ---  Advertise

I have given a query such that get me all title which matches "*Advertise"*.

But, it displayed all content which matches "advertise"(even though title is
different)

How can I search a content which matches only "*advertise"* as *title*?

Schema.xml

text

Thanks in advance for your precious time.
-kmu


Re: Field Search

2008-02-18 Thread Mahesh Udupa
Hi,

I forgot to put my dismax request handler.



 explicit
 0.01
 
text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
 
 
text^0.2 features^1.1 name^1.5 manu^1.4 manu_exact^1.9
 
 
ord(poplarity)^0.5 recip(rord(price),1,1000,1000)^0.3
 
 
id,name,price,score
 
 
2<-1 5<-2 6<90%
 
 100
 *:*

  

Do you think this is causing some issue?

-Thanks and Regards,
kmu


On Feb 19, 2008 6:31 AM, Mahesh Udupa <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I have a content with *title* as "*Advertise*" under a *category* "*Sales*
> "
> And also, I have 3 other contents with *titles "{TV, Web,Radio}"* under a
> *category "Advertise"*
> **
> Now, if I try to search for,
> *title:Advertise --- * I am getting following results:
> ==
> Title ---   Category
> ==
> Advertise  ---   Sales
> TV   ---   Advertise
>  Radio   ---   Advertise
>  Web ---  Advertise
>
> I have given a query such that get me all title which matches "*Advertise"
> *.
> But, it displayed all content which matches "advertise"(even though title
> is different)
>
> How can I search a content which matches only "*advertise"* as *title*?
>
> Schema.xml
>
> text
> 
> Thanks in advance for your precious time.
> -kmu
>


Special character in queries

2008-02-18 Thread Mahesh Udupa
Hi,

I have 2 content with name as follows:

a) "NewSong" sing --- with " in the name
b) sing

I need to search for the content *a* ( i.e. *"NewSong" sing*), I tried with
"\"NewSong\" sing", It failed to search.
But If I try to search with "NewSong" sing it displays both(that is
expected).

It would be great if some one please suggest me what is wrong in first
query.

Thanks in advance.
-kmu


What is default Date time format in Solr

2008-03-06 Thread Mahesh Udupa
Hi all,

I heard Solr Date time format is 24 hours.
But I have following query regarding Search time.


In database I have a content with time as :- 2007-12-31 22:29:59

In oder to get this content I tried with following Range query:-

emf.artist:[2007-12-31T22:20:00Z TO  2007-12-31T22:39:00Z]

I am not able to get the content what I expected.

But, I tried with following query:-

emf.artist:[2007-12-31T10:20:00Z TO  2007-12-31T10:39:00Z]

It is perfectly working fine.

My Schema.xml content for Date field is like this :-



Solrconfig.xml


 
 incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2


Could you please let me know how can I search a content with 24 Hour format?

Looking forward hearing from u soon

Thanks in advance

-kmu


How to override special meaning of +

2008-03-08 Thread Mahesh Udupa
Hi ,
I have following contents in my list:-

a) hot+cold
b) hot++cold
c) hotcold
d) hot cold
e) cold water
f) hot water

I want to search only for hot+cold. I tried with "hot\+cold" and also
hot\+cold. I got *first four* contents.
How to search only exact match?

I have 2 field types, title :- which is supported by dismax.
title_exact:- which does not supported by dismax. But only has
KeywordTokenizer, and Lowercase.

I tried with both fields (title and title_exact, no use :( ).
Is it necessary to follow any different mechanism here?

Thanks in advance .
-kmu


Re: What is default Date time format in Solr

2008-03-11 Thread Mahesh Udupa
Thanks Chris,

My index creation was wrong ;)(I was using 12 Hour format)

Thanks for your support
-kmu

On Sat, Mar 8, 2008 at 1:35 AM, Chris Hostetter <[EMAIL PROTECTED]>
wrote:

>
> : I heard Solr Date time format is 24 hours.
>
> that is correct.
>
> : emf.artist:[2007-12-31T22:20:00Z TO  2007-12-31T22:39:00Z]
> :
> : I am not able to get the content what I expected.
> :
> : But, I tried with following query:-
> :
> : emf.artist:[2007-12-31T10:20:00Z TO  2007-12-31T10:39:00Z]
>
> Is your emf.artist field stored?
> If so what value do you see in the field when you do that second query and
> get the results you are looking for?  if they don't match what you think
> they should be, then the code you have reading dates from your index and
> writing them to Solr isn't doing what you think it's doing.
>
>
>
>
> -Hoss
>
>