Re: retrieving latest document **only**
group field is timestamp… it is not multivalued. ./zahoor On 15-Jan-2013, at 7:14 PM, Upayavira u...@odoko.co.uk wrote: Is your group field multivalued? Could docs appear in more than one group? Upayavira On Tue, Jan 15, 2013, at 01:22 PM, J Mohamed Zahoor wrote: The sum of all the count in the groups… does not match the total no of docs found. ./zahoor On 12-Jan-2013, at 1:27 PM, Upayavira u...@odoko.co.uk wrote: Not sure exactly what you mean, can you give an example? Upayavira On Sat, Jan 12, 2013, at 06:32 AM, J Mohamed Zahoor wrote: Cool… it worked… But the count of all the groups and the count inside stats component does not match… Is that a bug? ./zahoor On 11-Jan-2013, at 6:48 PM, Upayavira u...@odoko.co.uk wrote: could you use field collapsing? Boost by date and only show one value per group, and you'll have the most recent document only. Upayavira On Fri, Jan 11, 2013, at 01:10 PM, jmozah wrote: one crude way is first query and pick the latest date from the result then issue a query with q=timestamp[latestDate TO latestDate] But i dont want to execute two queries... ./zahoor On 11-Jan-2013, at 6:37 PM, jmozah jmo...@gmail.com wrote: What do you want? 'the most recent ones' or '**only** the latest' ? Perhaps a range query q=timestamp:[refdate TO NOW] will match your needs. Uwe I need **only** the latest documents... in the above query , refdate can vary based on the query. ./zahoor
Re: retrieving latest document **only**
The sum of all the count in the groups… does not match the total no of docs found. ./zahoor On 12-Jan-2013, at 1:27 PM, Upayavira u...@odoko.co.uk wrote: Not sure exactly what you mean, can you give an example? Upayavira On Sat, Jan 12, 2013, at 06:32 AM, J Mohamed Zahoor wrote: Cool… it worked… But the count of all the groups and the count inside stats component does not match… Is that a bug? ./zahoor On 11-Jan-2013, at 6:48 PM, Upayavira u...@odoko.co.uk wrote: could you use field collapsing? Boost by date and only show one value per group, and you'll have the most recent document only. Upayavira On Fri, Jan 11, 2013, at 01:10 PM, jmozah wrote: one crude way is first query and pick the latest date from the result then issue a query with q=timestamp[latestDate TO latestDate] But i dont want to execute two queries... ./zahoor On 11-Jan-2013, at 6:37 PM, jmozah jmo...@gmail.com wrote: What do you want? 'the most recent ones' or '**only** the latest' ? Perhaps a range query q=timestamp:[refdate TO NOW] will match your needs. Uwe I need **only** the latest documents... in the above query , refdate can vary based on the query. ./zahoor
Re: retrieving latest document **only**
Is your group field multivalued? Could docs appear in more than one group? Upayavira On Tue, Jan 15, 2013, at 01:22 PM, J Mohamed Zahoor wrote: The sum of all the count in the groups… does not match the total no of docs found. ./zahoor On 12-Jan-2013, at 1:27 PM, Upayavira u...@odoko.co.uk wrote: Not sure exactly what you mean, can you give an example? Upayavira On Sat, Jan 12, 2013, at 06:32 AM, J Mohamed Zahoor wrote: Cool… it worked… But the count of all the groups and the count inside stats component does not match… Is that a bug? ./zahoor On 11-Jan-2013, at 6:48 PM, Upayavira u...@odoko.co.uk wrote: could you use field collapsing? Boost by date and only show one value per group, and you'll have the most recent document only. Upayavira On Fri, Jan 11, 2013, at 01:10 PM, jmozah wrote: one crude way is first query and pick the latest date from the result then issue a query with q=timestamp[latestDate TO latestDate] But i dont want to execute two queries... ./zahoor On 11-Jan-2013, at 6:37 PM, jmozah jmo...@gmail.com wrote: What do you want? 'the most recent ones' or '**only** the latest' ? Perhaps a range query q=timestamp:[refdate TO NOW] will match your needs. Uwe I need **only** the latest documents... in the above query , refdate can vary based on the query. ./zahoor
Re: retrieving latest document **only**
Am 10.01.2013 11:54, schrieb jmozah: I need a query that matches only the most recent ones... Because my stats depend on it.. But I have a requirement to show **only** the latest documents and the stats along with it.. What do you want? 'the most recent ones' or '**only** the latest' ? Perhaps a range query q=timestamp:[refdate TO NOW] will match your needs. Uwe
Re: retrieving latest document **only**
What do you want? 'the most recent ones' or '**only** the latest' ? Perhaps a range query q=timestamp:[refdate TO NOW] will match your needs. Uwe I need **only** the latest documents... in the above query , refdate can vary based on the query. ./zahoor
Re: retrieving latest document **only**
one crude way is first query and pick the latest date from the result then issue a query with q=timestamp[latestDate TO latestDate] But i dont want to execute two queries... ./zahoor On 11-Jan-2013, at 6:37 PM, jmozah jmo...@gmail.com wrote: What do you want? 'the most recent ones' or '**only** the latest' ? Perhaps a range query q=timestamp:[refdate TO NOW] will match your needs. Uwe I need **only** the latest documents... in the above query , refdate can vary based on the query. ./zahoor
Re: retrieving latest document **only**
could you use field collapsing? Boost by date and only show one value per group, and you'll have the most recent document only. Upayavira On Fri, Jan 11, 2013, at 01:10 PM, jmozah wrote: one crude way is first query and pick the latest date from the result then issue a query with q=timestamp[latestDate TO latestDate] But i dont want to execute two queries... ./zahoor On 11-Jan-2013, at 6:37 PM, jmozah jmo...@gmail.com wrote: What do you want? 'the most recent ones' or '**only** the latest' ? Perhaps a range query q=timestamp:[refdate TO NOW] will match your needs. Uwe I need **only** the latest documents... in the above query , refdate can vary based on the query. ./zahoor
Re: retrieving latest document **only**
Cool… it worked… But the count of all the groups and the count inside stats component does not match… Is that a bug? ./zahoor On 11-Jan-2013, at 6:48 PM, Upayavira u...@odoko.co.uk wrote: could you use field collapsing? Boost by date and only show one value per group, and you'll have the most recent document only. Upayavira On Fri, Jan 11, 2013, at 01:10 PM, jmozah wrote: one crude way is first query and pick the latest date from the result then issue a query with q=timestamp[latestDate TO latestDate] But i dont want to execute two queries... ./zahoor On 11-Jan-2013, at 6:37 PM, jmozah jmo...@gmail.com wrote: What do you want? 'the most recent ones' or '**only** the latest' ? Perhaps a range query q=timestamp:[refdate TO NOW] will match your needs. Uwe I need **only** the latest documents... in the above query , refdate can vary based on the query. ./zahoor
Re: retrieving latest document **only**
Not sure exactly what you mean, can you give an example? Upayavira On Sat, Jan 12, 2013, at 06:32 AM, J Mohamed Zahoor wrote: Cool… it worked… But the count of all the groups and the count inside stats component does not match… Is that a bug? ./zahoor On 11-Jan-2013, at 6:48 PM, Upayavira u...@odoko.co.uk wrote: could you use field collapsing? Boost by date and only show one value per group, and you'll have the most recent document only. Upayavira On Fri, Jan 11, 2013, at 01:10 PM, jmozah wrote: one crude way is first query and pick the latest date from the result then issue a query with q=timestamp[latestDate TO latestDate] But i dont want to execute two queries... ./zahoor On 11-Jan-2013, at 6:37 PM, jmozah jmo...@gmail.com wrote: What do you want? 'the most recent ones' or '**only** the latest' ? Perhaps a range query q=timestamp:[refdate TO NOW] will match your needs. Uwe I need **only** the latest documents... in the above query , refdate can vary based on the query. ./zahoor
retrieving latest document **only**
HI I use solr 4.0 and have documents which have a timestamp field. For a given query i know how to boost the latest documents and show them up first. But I have a requirement to show **only** the latest documents and the stats along with it.. If i use boosting..the older documents still make it to the query and therefore contribute to the stats... Can anyone tell me how to get **only** the latest dated document? PS: the latest date can be Today, yesterday.. anything int eh past.. so date based range filter would not help here.. ./zahoor
Re: retrieving latest document **only**
Hi, Can you sort on the timestamp field (descending) and take only the top most row (rows=1)? Or are you saying that you want a query such that it matches only the most recent one? On Thu, Jan 10, 2013 at 5:27 PM, jmozah jmo...@gmail.com wrote: HI I use solr 4.0 and have documents which have a timestamp field. For a given query i know how to boost the latest documents and show them up first. But I have a requirement to show **only** the latest documents and the stats along with it.. If i use boosting..the older documents still make it to the query and therefore contribute to the stats... Can anyone tell me how to get **only** the latest dated document? PS: the latest date can be Today, yesterday.. anything int eh past.. so date based range filter would not help here.. ./zahoor -- Regards Naresh
Re: retrieving latest document **only**
I need a query that matches only the most recent ones... Because my stats depend on it.. ./Zahoor HBase Musings On 10-Jan-2013, at 3:37 PM, Naresh nnar...@gmail.com wrote: Hi, Can you sort on the timestamp field (descending) and take only the top most row (rows=1)? Or are you saying that you want a query such that it matches only the most recent one? On Thu, Jan 10, 2013 at 5:27 PM, jmozah jmo...@gmail.com wrote: HI I use solr 4.0 and have documents which have a timestamp field. For a given query i know how to boost the latest documents and show them up first. But I have a requirement to show **only** the latest documents and the stats along with it.. If i use boosting..the older documents still make it to the query and therefore contribute to the stats... Can anyone tell me how to get **only** the latest dated document? PS: the latest date can be Today, yesterday.. anything int eh past.. so date based range filter would not help here.. ./zahoor -- Regards Naresh
Re: retrieving latest document **only**
Hi, Just add the required query clause with the appropriate range on that timestamp field you have to your existing query. Otis Solr ElasticSearch Support http://sematext.com/ On Jan 10, 2013 5:55 AM, jmozah jmo...@gmail.com wrote: I need a query that matches only the most recent ones... Because my stats depend on it.. ./Zahoor HBase Musings On 10-Jan-2013, at 3:37 PM, Naresh nnar...@gmail.com wrote: Hi, Can you sort on the timestamp field (descending) and take only the top most row (rows=1)? Or are you saying that you want a query such that it matches only the most recent one? On Thu, Jan 10, 2013 at 5:27 PM, jmozah jmo...@gmail.com wrote: HI I use solr 4.0 and have documents which have a timestamp field. For a given query i know how to boost the latest documents and show them up first. But I have a requirement to show **only** the latest documents and the stats along with it.. If i use boosting..the older documents still make it to the query and therefore contribute to the stats... Can anyone tell me how to get **only** the latest dated document? PS: the latest date can be Today, yesterday.. anything int eh past.. so date based range filter would not help here.. ./zahoor -- Regards Naresh