[jira] [Issue Comment Edited] (SOLR-2242) Get distinct count of names for a facet field
[ https://issues.apache.org/jira/browse/SOLR-2242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13095135#comment-13095135 ] Nguyen Kien Trung edited comment on SOLR-2242 at 9/1/11 5:50 AM: - I'm using Solr 3.2. Instead of patching, I extend {{SimpleFacets}} and {{FacetComponent}}, apply the changes mentioned in [^SOLR-2242.solr3.1.patch] with a small fix ([^SOLR-2242.solr3.1-fix.patch]). {code} int offset = params.getFieldInt(facetValue, FacetParams.FACET_OFFSET, 0); resCount.add(numTerms, counts.size() + offset); {code} as {{counts}} contains list of terms started from the given {{offset}} It accepts param {{facet.numTerms=true|false}} and produce the output {code} lst name=facet_fields lst name=color int name=numTerms124/int lst name=counts / int name=red4/int int name=blue3/int /lst /lst /lst {code} Not yet tested with sharding was (Author: trung): I'm using Solr 3.2. Instead of patching, I extend {{SimpleFacets}} and {{FacetComponent}}, apply the changes mentioned in [^SOLR-2242.solr3.1.patch] with a small fix ([^SOLR\-2242.solr3.1-fix.patch]). {code} int offset = params.getFieldInt(facetValue, FacetParams.FACET_OFFSET, 0); resCount.add(numTerms, counts.size() + offset); {code} as {{counts}} contains list of terms started from the given {{offset}} It accepts param {{facet.numTerms=true|false}} and produce the output {code} lst name=facet_fields lst name=color int name=numTerms124/int lst name=counts / int name=red4/int int name=blue3/int /lst /lst /lst {code} Not yet tested with sharding Get distinct count of names for a facet field - Key: SOLR-2242 URL: https://issues.apache.org/jira/browse/SOLR-2242 Project: Solr Issue Type: New Feature Components: Response Writers Affects Versions: 4.0 Reporter: Bill Bell Assignee: Simon Willnauer Priority: Minor Fix For: 4.0 Attachments: NumFacetTermsFacetsTest.java, SOLR-2242-notworkingtest.patch, SOLR-2242.patch, SOLR-2242.patch, SOLR-2242.shard.patch, SOLR-2242.shard.patch, SOLR-2242.shard.withtests.patch, SOLR-2242.solr3.1-fix.patch, SOLR-2242.solr3.1.patch, SOLR.2242.solr3.1.patch, SOLR.2242.v2.patch When returning facet.field=name of field you will get a list of matches for distinct values. This is normal behavior. This patch tells you how many distinct values you have (# of rows). Use with limit=-1 and mincount=1. The feature is called namedistinct. Here is an example: http://localhost:8983/solr/select?shards=localhost:8983/solr,localhost:7574/solrindent=trueq=*:*facet=truefacet.mincount=1facet.numFacetTerms=2facet.limit=-1facet.field=price http://localhost:8983/solr/select?shards=localhost:8983/solr,localhost:7574/solrindent=trueq=*:*facet=truefacet.mincount=1facet.numFacetTerms=0facet.limit=-1facet.field=price http://localhost:8983/solr/select?shards=localhost:8983/solr,localhost:7574/solrindent=trueq=*:*facet=truefacet.mincount=1facet.numFacetTerms=1facet.limit=-1facet.field=price This currently only works on facet.field. {code} lst name=facet_fields lst name=price int name=numFacetTerms14/int int name=0.03/intint name=11.51/intint name=19.951/intint name=74.991/intint name=92.01/intint name=179.991/intint name=185.01/intint name=279.951/intint name=329.951/intint name=350.01/intint name=399.01/intint name=479.951/intint name=649.991/intint name=2199.01/int /lst /lst {code} Several people use this to get the group.field count (the # of groups). -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-2242) Get distinct count of names for a facet field
[ https://issues.apache.org/jira/browse/SOLR-2242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nguyen Kien Trung updated SOLR-2242: Attachment: SOLR-2242.solr3.1-fix.patch I'm using Solr 3.2. Instead of patching, I extend {{SimpleFacets}} and {{FacetComponent}}, apply the changes mentioned in [^SOLR-2242.solr3.1.patch] with a small fix ([^SOLR\-2242.solr3.1-fix.patch]). {code} int offset = params.getFieldInt(facetValue, FacetParams.FACET_OFFSET, 0); resCount.add(numTerms, counts.size() + offset); {code} as {{counts}} contains list of terms started from the given {{offset}} It accepts param {{facet.numTerms=true|false}} and produce the output {code} lst name=facet_fields lst name=color int name=numTerms124/int lst name=counts / int name=red4/int int name=blue3/int /lst /lst /lst {code} Not yet tested with sharding Get distinct count of names for a facet field - Key: SOLR-2242 URL: https://issues.apache.org/jira/browse/SOLR-2242 Project: Solr Issue Type: New Feature Components: Response Writers Affects Versions: 4.0 Reporter: Bill Bell Assignee: Simon Willnauer Priority: Minor Fix For: 4.0 Attachments: NumFacetTermsFacetsTest.java, SOLR-2242-notworkingtest.patch, SOLR-2242.patch, SOLR-2242.patch, SOLR-2242.shard.patch, SOLR-2242.shard.patch, SOLR-2242.shard.withtests.patch, SOLR-2242.solr3.1-fix.patch, SOLR-2242.solr3.1.patch, SOLR.2242.solr3.1.patch, SOLR.2242.v2.patch When returning facet.field=name of field you will get a list of matches for distinct values. This is normal behavior. This patch tells you how many distinct values you have (# of rows). Use with limit=-1 and mincount=1. The feature is called namedistinct. Here is an example: http://localhost:8983/solr/select?shards=localhost:8983/solr,localhost:7574/solrindent=trueq=*:*facet=truefacet.mincount=1facet.numFacetTerms=2facet.limit=-1facet.field=price http://localhost:8983/solr/select?shards=localhost:8983/solr,localhost:7574/solrindent=trueq=*:*facet=truefacet.mincount=1facet.numFacetTerms=0facet.limit=-1facet.field=price http://localhost:8983/solr/select?shards=localhost:8983/solr,localhost:7574/solrindent=trueq=*:*facet=truefacet.mincount=1facet.numFacetTerms=1facet.limit=-1facet.field=price This currently only works on facet.field. {code} lst name=facet_fields lst name=price int name=numFacetTerms14/int int name=0.03/intint name=11.51/intint name=19.951/intint name=74.991/intint name=92.01/intint name=179.991/intint name=185.01/intint name=279.951/intint name=329.951/intint name=350.01/intint name=399.01/intint name=479.951/intint name=649.991/intint name=2199.01/int /lst /lst {code} Several people use this to get the group.field count (the # of groups). -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] Commented: (SOLR-471) Distributed Solr Client
[ https://issues.apache.org/jira/browse/SOLR-471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=1256#action_1256 ] Nguyen Kien Trung commented on SOLR-471: Thanks Yonik. Actually I did have a glance at SOLR-303 As I'm doing a Java project which requires interaction with multiple customized-solr instances and it happened to me that the requirement was not meet with the solution which SOLR-303 offers, so I made the workaround with the thought that the patch may be helpful to those who are having same situation like me. I'm quite new to solr but very excited with the promising features that solr is going to achieve Distributed Solr Client --- Key: SOLR-471 URL: https://issues.apache.org/jira/browse/SOLR-471 Project: Solr Issue Type: New Feature Components: clients - java Affects Versions: 1.3 Reporter: Nguyen Kien Trung Priority: Minor Attachments: distributedclient.patch Inspired by memcached java clients. The ability to update/search/delete among many solr instances Client parametters: - List of solr servers - Number of replicas Client functions: - Update: using consistent hashing to determine what documents are going to be stored in what server. Get the list of servers (equal to number of replicas) and issue parallel UPDATE - Search: parallel search all servers, aggregate distinct results - Delete: parallel delete in all servers -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-471) Distributed Solr Client
[ https://issues.apache.org/jira/browse/SOLR-471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nguyen Kien Trung updated SOLR-471: --- Description: Inspired by memcached java clients. The ability to update/search/delete among many solr instances Client parametters: - List of solr servers - Number of replicas Client functions: - Update: using consistent hashing to determine what documents are going to be stored in what server. Get the list of servers (equal to number of replicas) and issue parallel UPDATE - Search: parallel search all servers, aggregate distinct results - Delete: parallel delete in all servers was: Inspired by memcached java clients. The ability to update/search/delete among many solr instances Client parametters: - List of solr servers - Number of replicas Client functions: - Update: using consistent hashing to determine what documents are going to be stored in what server. Get the list of servers (equal to number of replicas) and issue parallel UPDATE - Search: parallel search all servers, aggregate distinct results - Delete: parallel delete in all servers Distributed Solr Client --- Key: SOLR-471 URL: https://issues.apache.org/jira/browse/SOLR-471 Project: Solr Issue Type: New Feature Components: clients - java Affects Versions: 1.3 Reporter: Nguyen Kien Trung Priority: Minor Inspired by memcached java clients. The ability to update/search/delete among many solr instances Client parametters: - List of solr servers - Number of replicas Client functions: - Update: using consistent hashing to determine what documents are going to be stored in what server. Get the list of servers (equal to number of replicas) and issue parallel UPDATE - Search: parallel search all servers, aggregate distinct results - Delete: parallel delete in all servers -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (SOLR-471) Distributed Solr Client
Distributed Solr Client --- Key: SOLR-471 URL: https://issues.apache.org/jira/browse/SOLR-471 Project: Solr Issue Type: New Feature Components: clients - java Affects Versions: 1.3 Reporter: Nguyen Kien Trung Priority: Minor Inspired by memcached java clients. The ability to update/search/delete among many solr instances Client parametters: - List of solr servers - Number of replicas Client functions: - Update: using consistent hashing to determine what documents are going to be stored in what server. Get the list of servers (equal to number of replicas) and issue parallel UPDATE - Search: parallel search all servers, aggregate distinct results - Delete: parallel delete in all servers -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-471) Distributed Solr Client
[ https://issues.apache.org/jira/browse/SOLR-471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nguyen Kien Trung updated SOLR-471: --- Attachment: distributedclient.patch - Changed method toString() and override hashCode(), equals() in SolrDocument model. These modifications are to filter unique SolrDocument objects in a set - Created test cases to setup multiple SolrHttpServers and perform update/delete/query operations Distributed Solr Client --- Key: SOLR-471 URL: https://issues.apache.org/jira/browse/SOLR-471 Project: Solr Issue Type: New Feature Components: clients - java Affects Versions: 1.3 Reporter: Nguyen Kien Trung Priority: Minor Attachments: distributedclient.patch Inspired by memcached java clients. The ability to update/search/delete among many solr instances Client parametters: - List of solr servers - Number of replicas Client functions: - Update: using consistent hashing to determine what documents are going to be stored in what server. Get the list of servers (equal to number of replicas) and issue parallel UPDATE - Search: parallel search all servers, aggregate distinct results - Delete: parallel delete in all servers -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.