Re: Solr 3.3 Sorting is not working for long fields

2011-11-15 Thread rajini maski
Thankyou for the responses :)

  Found that the bug was in naming convention of fields. (for tlong/long )
I had given a number character as a name of the field.
Studyid field name was - 450 , Changed it to S450 and it started working :)

Thank you all.

Regards,
Rajani




On Tue, Nov 15, 2011 at 3:28 PM, Michael Kuhlmann  wrote:

> Hi,
>
> Am 15.11.2011 10:25, schrieb rajini maski:
>
>  > omitNorms="true" positionIncrementGap="0"/>
>>
>
> [...]
>
>
>  > omitNorms="true" positionIncrementGap="0"/>
>>
>
> [...]
>
>
> 
>>
>
> Hmh, why didn't you just changed the field type to tlong as you mentioned
> before? Instead you changed the class of the long type. There's nothing
> against this, it's just a bit confusing since long fields normally are of
> type solr.LongField, which is not sortable on its own.
>
> You specified a precisionStep of 0, which means that the field would be
> slow in range queries, but it shouldn't harm for sorting. All in all, it
> should work.
>
> So, the only chance I see is to re-index once again (and commit after
> that). I don't really see an error in your config except the confusing
> "long" type. It should work after reindexing, and it can't work if it was
> indexed with a genuine long type.
>
> -Kuli
>


Re: Solr 3.3 Sorting is not working for long fields

2011-11-15 Thread Michael Kuhlmann

Hi,

Am 15.11.2011 10:25, schrieb rajini maski:

 


[...]


 


[...]





Hmh, why didn't you just changed the field type to tlong as you 
mentioned before? Instead you changed the class of the long type. 
There's nothing against this, it's just a bit confusing since long 
fields normally are of type solr.LongField, which is not sortable on its 
own.


You specified a precisionStep of 0, which means that the field would be 
slow in range queries, but it shouldn't harm for sorting. All in all, it 
should work.


So, the only chance I see is to re-index once again (and commit after 
that). I don't really see an error in your config except the confusing 
"long" type. It should work after reindexing, and it can't work if it 
was indexed with a genuine long type.


-Kuli


Re: Solr 3.3 Sorting is not working for long fields

2011-11-15 Thread rajini maski
All

I didnt find any mistake in the schema.. below I have psted my
schema file







  

  























































  

  


  

  




  




  
  




  




  









  
  








  




  








  
  







  




  









  




  




  
  




  







  








  



  


  



  



  




  


  



  

  











   

 


 
   

 











   
   
   
   
   
   
   
   
   
   
   
   

   
   

   
   
   
   
   
   
   
   
   
   
   


   
   

   
   

   
   

   

   
   


   
   
   
   
   
   
   
   
   

   
   

   
   

   
   
   
   
   
   

   

   
   

   

   
   

 

 
 ID

 
 text

 
 

  

   
   
   
   
   
   
   

   

   
   


 
 
 
 





On Tue, Nov 15, 2011 at 2:53 PM, rajini maski  wrote:

> All,
>
>
>
> On Tue, Nov 15, 2011 at 1:21 PM, kashif.khan  wrote:
>
>> Obviously there is some problem somewhere in the schema or any other
>> files.
>> the default SOLR demo which is by using the start.jar works well with the
>> long field. It is just that we do not know where is the problem causing
>> this
>> error.
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Solr-3-3-Sorting-is-not-working-for-long-fields-tp3499366p3508947.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>
>


Re: Solr 3.3 Sorting is not working for long fields

2011-11-15 Thread rajini maski
All,



On Tue, Nov 15, 2011 at 1:21 PM, kashif.khan  wrote:

> Obviously there is some problem somewhere in the schema or any other files.
> the default SOLR demo which is by using the start.jar works well with the
> long field. It is just that we do not know where is the problem causing
> this
> error.
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-3-3-Sorting-is-not-working-for-long-fields-tp3499366p3508947.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: Solr 3.3 Sorting is not working for long fields

2011-11-15 Thread kashif.khan
Obviously there is some problem somewhere in the schema or any other files.
the default SOLR demo which is by using the start.jar works well with the
long field. It is just that we do not know where is the problem causing this
error.

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-3-3-Sorting-is-not-working-for-long-fields-tp3499366p3508947.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr 3.3 Sorting is not working for long fields

2011-11-14 Thread Ahmet Arslan
> Yes .


> > Did you restart tomcat and perform re-index?
> >
> 

Okey, one thing left. Http caching may cause stale response. Delete your 
browsers cache if you are using a browser to query solr. 


Re: Solr 3.3 Sorting is not working for long fields

2011-11-14 Thread rajini maski
Yes .

On 11/14/11, Ahmet Arslan  wrote:
>> I tried this one.   > name="tlong" class="solr.TrieLongField"
>> precisionStep="8" omitNorms="true"
>> positionIncrementGap="0"/>
>>
>> It didn't work :(
>>
>> Sort didn't happen
>
>
> Did you restart tomcat and perform re-index?
>


Re: Solr 3.3 Sorting is not working for long fields

2011-11-14 Thread Ahmet Arslan
> I tried this one.    name="tlong" class="solr.TrieLongField"
> precisionStep="8" omitNorms="true"
> positionIncrementGap="0"/>
> 
> It didn't work :(
> 
> Sort didn't happen


Did you restart tomcat and perform re-index?


Re: Solr 3.3 Sorting is not working for long fields

2011-11-14 Thread rajini maski
I

On Mon, Nov 14, 2011 at 7:23 PM, Ahmet Arslan  wrote:

> > When I do a basic sort on *long *field. the sort doesn't
> > happen.
> >
> >
> > Query is :
> >
> > -<
> http://blr-ws-195:8091/Solr3.3/select/?q=2%3A104+AND+526%3A27747&version=2.2&start=0&rows=10&indent=on&sort=469%20asc&fl=469#
> >
> > 
> >   0
> >   3
> >  -<
> http://blr-ws-195:8091/Solr3.3/select/?q=2%3A104+AND+526%3A27747&version=2.2&start=0&rows=10&indent=on&sort=469%20asc&fl=469#
> >
> > 
> >   studyid
> >   studyid asc
> >   on
> >   0
> >   *:*
> >   100
> >   2.2
> >  
> >  
> >
> >
> >
> >
> > 
> > - 
> > - 
> >   53
> >   
> > - 
> >   18
> >   
> > - 
> >   14
> >   
> > - 
> >   11
> >   
> > - 
> >   7
> >   
> > - 
> >   63
> >   
> > - 
> >   35
> >   
> > - 
> >   70
> >   
> > - 
> >   91
> >   
> > - 
> >   97
> >   
> >   
> >   
> >
> >
> > The same case works with Solr1.4.1 but it is not working
> > solr 3.3
>
> Can you try with the following type?
>
>   omitNorms="true" positionIncrementGap="0"/>
>
> And studyid must be marked as indexed="true".
>


I tried this one.   

It didn't work :(

Sort didn't happen


Re: Solr 3.3 Sorting is not working for long fields

2011-11-14 Thread Ahmet Arslan
> When I do a basic sort on *long *field. the sort doesn't
> happen.
> 
> 
> Query is :
> 
> -
> 
>   0
>   3
>  
> -
> 
>   studyid
>   studyid asc
>   on
>   0
>   *:*
>   100
>   2.2
>  
>  
> 
> 
> 
> 
> 
> - 
> - 
>   53
>   
> - 
>   18
>   
> - 
>   14
>   
> - 
>   11
>   
> - 
>   7
>   
> - 
>   63
>   
> - 
>   35
>   
> - 
>   70
>   
> - 
>   91
>   
> - 
>   97
>   
>   
>   
> 
> 
> The same case works with Solr1.4.1 but it is not working
> solr 3.3

Can you try with the following type?

  

And studyid must be marked as indexed="true".


Re: Solr 3.3 Sorting is not working for long fields

2011-11-14 Thread rajini maski
There is no error as such.

When I do a basic sort on *long *field. the sort doesn't happen.


Query is :

-

  0
  3
 
-

  studyid
  studyid asc
  on
  0
  *:*
  100
  2.2
 
 





- 
- 
  53
  
- 
  18
  
- 
  14
  
- 
  11
  
- 
  7
  
- 
  63
  
- 
  35
  
- 
  70
  
- 
  91
  
- 
  97
  
  
  


The same case works with Solr1.4.1 but it is not working solr 3.3


Regards,
Rajani

On Mon, Nov 14, 2011 at 2:23 PM, Michael Kuhlmann  wrote:

> Am 14.11.2011 09:33, schrieb rajini maski:
>
>> query :
>> http://localhost:8091/Group/**select?/&indent=on&q=studyid:**
>> 120&sort=studyidasc,groupid
>> asc,subjectid asc&start=0&rows=10
>>
>
> Is it a copy-and-paste error, or did you realls sort on "studyidasc"?
>
> I don't think you have a field studyidasc, and Solr should've given an
> exception that either asc or desc is missing.
>
> -Kuli
>


Re: Solr 3.3 Sorting is not working for long fields

2011-11-14 Thread Michael Kuhlmann

Am 14.11.2011 09:33, schrieb rajini maski:

query :
http://localhost:8091/Group/select?/&indent=on&q=studyid:120&sort=studyidasc,groupid
asc,subjectid asc&start=0&rows=10


Is it a copy-and-paste error, or did you realls sort on "studyidasc"?

I don't think you have a field studyidasc, and Solr should've given an 
exception that either asc or desc is missing.


-Kuli


Re: Solr 3.3 Sorting is not working for long fields

2011-11-14 Thread rajini maski
Field type is long and not multi valued.
Using solr 3.3 war file ,
Tried on solr 1.4.1 index and solr 3.3 index , both cases its not working.

query :
http://localhost:8091/Group/select?/&indent=on&q=studyid:120&sort=studyidasc,groupid
asc,subjectid asc&start=0&rows=10

all the ID fields are long

Thanks & Regards
Rajani


On Sun, Nov 13, 2011 at 7:58 AM, Erick Erickson wrote:

> Well, 3.3 has been around for quite a while, I'd suspect that
> something this fundamental would have been found...
>
> Is your field multi-valued? And what kind of field is
> studyid?
>
> You really have to provide more details, input, output, etc
> to get reasonable help. It might help to review:
>
> http://wiki.apache.org/solr/UsingMailingLists
>
> Best
> Erick
>
> On Fri, Nov 11, 2011 at 5:52 AM, rajini maski 
> wrote:
> > Hi,
> >
> > I have upgraded my Solr from 1.4.1 to 3.3.Now I tried to sort
> > on a long field and documents are not getting sorted based on that.
> >
> > Sort is working when we do sorting on facet ex:facet=on
> &facet.sort=studyid
> >
> > But when do simple sort on documents , sort=studyid,  sort doesn't
> happen.
> > Is there any bug ?
> >
> >
> >
> > Regards,
> > Rajani
> >
>


Re: Solr 3.3 Sorting is not working for long fields

2011-11-12 Thread Erick Erickson
Well, 3.3 has been around for quite a while, I'd suspect that
something this fundamental would have been found...

Is your field multi-valued? And what kind of field is
studyid?

You really have to provide more details, input, output, etc
to get reasonable help. It might help to review:

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

Best
Erick

On Fri, Nov 11, 2011 at 5:52 AM, rajini maski  wrote:
> Hi,
>
>             I have upgraded my Solr from 1.4.1 to 3.3.Now I tried to sort
> on a long field and documents are not getting sorted based on that.
>
> Sort is working when we do sorting on facet ex:facet=on &facet.sort=studyid
>
> But when do simple sort on documents , sort=studyid,  sort doesn't happen.
> Is there any bug ?
>
>
>
> Regards,
> Rajani
>


Solr 3.3 Sorting is not working for long fields

2011-11-11 Thread rajini maski
Hi,

 I have upgraded my Solr from 1.4.1 to 3.3.Now I tried to sort
on a long field and documents are not getting sorted based on that.

Sort is working when we do sorting on facet ex:facet=on &facet.sort=studyid

But when do simple sort on documents , sort=studyid,  sort doesn't happen.
Is there any bug ?



Regards,
Rajani