Does sort field need have to be 'store'?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Does sort field need have to be 'store'?

James liu-2
for example, i wanna sort by datetime, does it have to be store='true', and
i wanna define it

<field name="datetime" type="date" indexed="true" stored="false"/>

am i right?

if right, iwanna define score like that and how to define it or maybe it was



if my field all use index=true, stored=false, does it means low disk
io and more ram used?

how can i use it all with ram and how to config which ram i should use?



--
regards
jl
Reply | Threaded
Open this post in threaded view
|

Re: Does sort field need have to be 'store'?

Yonik Seeley-2
On 6/25/07, James liu <[hidden email]> wrote:
> for example, i wanna sort by datetime, does it have to be store='true', and
> i wanna define it
>
> <field name="datetime" type="date" indexed="true" stored="false"/>

That's fine... to sort by a field, it must be indexed.  It does not
matter if it is stored.

-Yonik
Reply | Threaded
Open this post in threaded view
|

Re: Does sort field need have to be 'store'?

James liu-2
thks Yonik,and

[quote]how can i use index all with ram and how to config which ram i should
use?[/quote]
Reply | Threaded
Open this post in threaded view
|

Re: Does sort field need have to be 'store'?

Mike Klaas
On 25-Jun-07, at 10:53 PM, James liu wrote:

>
> [quote]how can i use index all with ram and how to config which ram  
> i should
> use?[/quote]

Your os will automatically load the most frequently-used parts of the  
index in ram.  If your total ram is at least as large as the total  
JVM heap size plus the on-disk footprint of the index, it will  
eventually reside completely in memory (assuming no other processes  
are using ram).

I don't understand your second question.

-MIke
Reply | Threaded
Open this post in threaded view
|

Re: Does sort field need have to be 'store'?

James liu-2
2007/6/27, Mike Klaas <[hidden email]>:

>
> On 25-Jun-07, at 10:53 PM, James liu wrote:
>
> >
> > [quote]how can i use index all with ram and how to config which ram
> > i should
> > use?[/quote]
>
> Your os will automatically load the most frequently-used parts of the
> index in ram.

 If your total ram is at least as large as the total
> JVM heap size plus the on-disk footprint of the index, it will
> eventually reside completely in memory (assuming no other processes
> are using ram).
>
> I don't understand your second question.
>
-MIke
>

thks mike,,,the second question is how to calc the ram size i should have
when i wanna index reside completely in RAM.




--
regards
jl
Reply | Threaded
Open this post in threaded view
|

Re: Does sort field need have to be 'store'?

Yonik Seeley-2
On 6/26/07, James liu <[hidden email]> wrote:
> thks mike,,,the second question is how to calc the ram size i should have
> when i wanna index reside completely in RAM.

It's fairly specific to the collection... index a bunch of documents
and see how much space it takes up.  Make sure to do a lot of them
because the index normally grows sub-linearly.  Then subtract the size
the JVM is taking from the amount of RAM on the box.

-Yonik