5.1 'unique' facet function / calcDistinct

2015-04-16 Thread levanDev
Hello, 

We are looking at a couple of options for using solr to dynamically calulate
unique values per field. In testing out Solr 5.1, I've been using the
unique() facet function:

http://yonik.com/solr-facet-functions/

Overall, loving the JSON Facet API, especially the sub-faceting thus far. 

Here's my two part question:

I. When I use the unique aggregation function on a "string" field
(uniqueValues:'unique(myStringField)'), it works as expected, returns the
number of unique fields. However when I pass in an int -- or date -- field
(uniqueValues:'unique(myIntField)') the resulting count is 0. The cause
might be something else, but if it can be replicated by another user, would
be great to discuss the unique function further -- in our current use-case,
we have a field where under 20 unique values are present but the values are
ints.

II. Is there a way to use the stats.calcdistinct functionality and only
return the countDistinct portion of the response and not the full list of
distinct values -- as provided in the distinctValues portion of the
response. In a field with high cardinality the response size becomes too
large. 

If there is no such option, could someone point me in the right direction
for implementing a custom solution?

Thank you for your time,
Levan



--
View this message in context: 
http://lucene.472066.n3.nabble.com/5-1-unique-facet-function-calcDistinct-tp4200110.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: 5.1 'unique' facet function / calcDistinct

2015-04-17 Thread levanDev
I've posted the issue here, please let me know if any additional information
needs to be provided.

https://issues.apache.org/jira/browse/SOLR-7417

Happy to provide the feedback, using the sub-facets has been a lot of fun,
the nested facet query is especially useful.




--
View this message in context: 
http://lucene.472066.n3.nabble.com/5-1-unique-facet-function-calcDistinct-tp4200110p4200534.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: 5.1 'unique' facet function / calcDistinct

2015-04-17 Thread levanDev
Perfect, thank you for the information -- will have a look through those
classes. 

Thank you,
Levan



--
View this message in context: 
http://lucene.472066.n3.nabble.com/5-1-unique-facet-function-calcDistinct-tp4200110p4200535.html
Sent from the Solr - User mailing list archive at Nabble.com.


Parsing dating during indexing - Year Only

2015-06-19 Thread levanDev
Hello,

Example csv doc has column 'just_the_year' and value '2010':  

With the Schema API I can tell the indexing process to treat 'just_the_year'
as a date field. 

I know that I can update the solrconfig.xml to correctly parse formats such
as MM/dd/ (which is awesome) but has anyone tried to covert just the
year value to a full date ("2010-01-01T00:00:00Z") by updating the
solrconfig.xml?

I know it's possible to import csv, do the date transformation, export again
and have everything work nicely but it would be cool to reduce the number of
steps involved and use the powerful date processor. 

Thank you, 
Levan



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Parsing-dating-during-indexing-Year-Only-tp4213045.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Parsing dating during indexing - Year Only

2015-06-19 Thread levanDev
Hi Chris, 

Thank you for taking the time to write the detailed response. Very helpful.
Dealing with interesting formats in the source data and trying to evaluate
various options for our business needs. The second scenario you described
(where some values in the date field are just the year) will either come up
pretty soon for me or will certainly help someone else dealing with that
issue currently. 

Thank you,  
Levan



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Parsing-date-during-indexing-Year-Only-tp4213045p4213065.html
Sent from the Solr - User mailing list archive at Nabble.com.