Delete by query
Hi, I have an index with 3M docs. Each doc has a field calld version_uuid. I want to delete all docs that theire version_uuid is other then 'e04534e2-28db-4420-a5f3-300477872c11' (for example :-)) This is the query I submit to the SolrServer object using the deleteByQuery method: NOT version_uuid:e04534e2-28db-4420-a5f3-300477872c11 I also tried: -version_uuid:e04534e2-28db-4420-a5f3-300477872c11 But still all docs are there. Any ideas? Am I doing somthing wrong? Noam. -- View this message in context: http://old.nabble.com/Delete-by-query-tp27306968p27306968.html Sent from the Solr - User mailing list archive at Nabble.com.
RE: Delete by query
Hi David, Thank you very much - that did the trick :-) Noam. -- View this message in context: http://old.nabble.com/Delete-by-query-tp27306968p27307336.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Choosing what document to return.
Hi Mei Thank you very much - looks good :-) Noam. -- View this message in context: http://old.nabble.com/Choosing-what-document-to-return.-tp27259310p27293083.html Sent from the Solr - User mailing list archive at Nabble.com.
Choosing what document to return.
Hi Guys, I'll start by thanking every one for an amazing search engine! What am I trying to do? Basically what I need is the ability to do some kind of switch or an if-else flow based on the field value and a parameter that I will pass using the query string. The result will be documents that comply with this logic. For example (myval1, myval2 and myval3 are the params from the query string): if(index_value == myval1) { if(other_index_value == 1){ don't return the document; } else { return the document; } }else if(index_value == myval2) { ... }else if(index_value == myval3) { ... } What should I override to implement this? Thank you very much, Noam. -- View this message in context: http://old.nabble.com/Choosing-what-document-to-return.-tp27259310p27259310.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Choosing what document to return.
Hi All (Erick, David...) Thanks for replying. Let me try to elaborate: - Each document holds a string value called name, an int parameter called payout a parameter called network_id. - Name can be any string. - Payout can be any number. - Network_id can be one of maximum 20 available values (for example network1 , network2 and so on). The query will need to pass: - name:abc (for example) - network:network1 - minval:20 The result will return only: - Documents that have abc in their name (just to empesize the need of the regular query also) - If document.network_id == network1 then if payoutminval then add the document to the results. end if else don't add the document to the results. end if As you can see the problem I have is with the if-else. I hope it was clearer now :-) Noam. -- View this message in context: http://old.nabble.com/Choosing-what-document-to-return.-tp27259310p27259888.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Choosing what document to return.
Hi Mei, The problem is that I need to do a calculation on the field. So I assumed I need to extend one of the classes in order to be able to do a calculation on a field with an if-else capabailities. Don't I? Noam. -- View this message in context: http://old.nabble.com/Choosing-what-document-to-return.-tp27259310p27259945.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Choosing what document to return.
Hi Mei, I replyed to you directlly by mistake - so here is the message again - allmost the same ;-) I think I'm getting it now :-) Let's take your suggestion: name:abc AND ((network_id:network1 AND payout:[minval TO *]) OR -network_id:network1) What I need is not the value of payout but, 50% of payout - and in another query a differnt value - I guess I need to use a function? How can I do it? And one more time - thank you :-) Noam. -- View this message in context: http://old.nabble.com/Choosing-what-document-to-return.-tp27259310p27261312.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Choosing what document to return.
Hi Mei, You are right. Suddenlly it looks clear - is it too late? :-) Let me look at it again tomorrow. Thank you very much :-) Noam. Wangsheng Mei wrote: 2010/1/22 Noam G. noam...@gmail.com Hi Mei, I replyed to you directlly by mistake - so here is the message again - allmost the same ;-) I think I'm getting it now :-) Let's take your suggestion: name:abc AND ((network_id:network1 AND payout:[minval TO *]) OR -network_id:network1) What I need is not the value of payout but, 50% of payout - and in another query a differnt value - I guess I need to use a function? if you need 50% of payout to be bigger than minval, it's equal to payout bigger than 2*minval, right? why not calculate 2*minval first as newMinval = 2*minval, and use name:abc AND ((network_id:network1 AND payout:[newMinval TO *]) OR -network_id:network1)? :-) How can I do it? And one more time - thank you :-) Noam. -- View this message in context: http://old.nabble.com/Choosing-what-document-to-return.-tp27259310p27261312.html Sent from the Solr - User mailing list archive at Nabble.com. -- 梅旺生 -- View this message in context: http://old.nabble.com/Choosing-what-document-to-return.-tp27259310p27263025.html Sent from the Solr - User mailing list archive at Nabble.com.