Hi Erick
Thank you for pointing out the sort behaviour of numbers in a string
field. I did not think of that. Will use float.
Would like to know how would you guys handle the usage of collection
alias in my case.
I have a 'product' collectionand Icreate a new collection'product_tmp'
for this field type change and index into it. I create an alias
'product' on this new 'product_tmp' collection.
IfI were to index to or delete documents from the 'product' collection,
SOLR will index on and delete from 'product_tmp' collection, am I right?
That means the 'product' collection cannot be usedanymore?
Even if I were to create an alias 'product_old' on 'product'
collection;issue a delete all documents or index on 'product_old', SOLR
will delete or index on 'product_tmp' collection instead?
My intention is to avoid having to updatethe clients serversto point to
'product_tmp' collection.
On 5/31/2016 10:57 AM, Erick Erickson wrote:
bq: Should I change the field type to "float" or "string"?
I'd go with float. Let's assume you want to sort by
this field. 1000000000.00 sorts before 9.0 if you
just use Strings. Plus floats are generally much more
compact.
bq: do I need to delete all documents in the index and do a full indexing
That's the way I'd do it. You can always index to a _new_ collection
(assuming SolrCloud) and use collection aliasing to switch your
search all at once
Best,
Erick
On Sun, May 29, 2016 at 12:56 AM, Derek Poh <d...@globalsources.com> wrote:
I am using solr 4.10.4.
On 5/29/2016 3:52 PM, Derek Poh wrote:
Hi
I have a field that is of "int" type currentlyand it's values are whole
numbers.
<field name="P_SupplierNeedinessIdx" type="int" indexed="true"
stored="true" multiValued="false"/>
Due tochange inbusiness requirement, this field will need to take in
decimal numbers as well.
This fieldis sorted onand filter by range (field:[ 1 to *]).
Should I change the field type to "float" or "string"?
For the change to take effect, do I need to delete all documents in the
index and do a full indexing? Or I can just do a full indexing without
theneed to delete all documents first?
Derek
----------------------
CONFIDENTIALITY NOTICE
This e-mail (including any attachments) may contain confidential and/or
privileged information. If you are not the intended recipient or have
received this e-mail in error, please inform the sender immediately and
delete this e-mail (including any attachments) from your computer, and you
must not use, disclose to anyone else or copy this e-mail (including any
attachments), whether in whole or in part.
This e-mail and any reply to it may be monitored for security, legal,
regulatory compliance and/or other appropriate reasons.
----------------------
CONFIDENTIALITY NOTICE
This e-mail (including any attachments) may contain confidential and/or
privileged information. If you are not the intended recipient or have
received this e-mail in error, please inform the sender immediately and
delete this e-mail (including any attachments) from your computer, and you
must not use, disclose to anyone else or copy this e-mail (including any
attachments), whether in whole or in part.
This e-mail and any reply to it may be monitored for security, legal,
regulatory compliance and/or other appropriate reasons.
----------------------
CONFIDENTIALITY NOTICE
This e-mail (including any attachments) may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please inform the sender immediately and delete this e-mail (including any attachments) from your computer, and you must not use, disclose to anyone else or copy this e-mail (including any attachments), whether in whole or in part.
This e-mail and any reply to it may be monitored for security, legal,
regulatory compliance and/or other appropriate reasons.