[jira] Commented: (SOLR-258) Date based Facets

2007-07-15 Thread Tristan Vittorio (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512775
 ] 

Tristan Vittorio commented on SOLR-258:
---

 4) my hesitation about renaming gap to interval is that i wanted to leave 
 the door open 
  for a sperate interval option (to define a gap between the gaps so 
 to speak) later 
  should it be desired ... see the questions i listed when opening the 
 bug.

I do like the idea of having an interval between gaps, however to me it 
would make more sense to reverse the meanings of these parameters to have 
gaps between intervals.  Regardless, as long as it's clearly documented, it 
shouldn't make any difference what you name them.

 5) i don't think this code makes sense for non-linear intervals ...

It might be better to keep the logic simple and as-is for now so you can commit 
it.  Having a facet.range parameter or some way to specify multiple date 
facets on a single field would be useful in the future.

 7) my prefrence is for every count to cover a range of exactly gap but i 
 can definitely see where 
  having a hard cutoff of end is usefull, so i'll make it an option ... 
 name suggestions?

Just thinking through this further, rather than specifying both start and end 
times, it might be more precise to specify a single start time, a gap, and a 
gap count (how many gaps to include), this will avoid the problem of the 
last gap going past the end date.

I find it much easier to criticize other people's naming conventions than to 
come up with good ones myself, however I'll offer hardend (true | false) as 
an interim name, hopefully someone can think of a better one.

 i'll make sure to echo the value of end as well so it's easy to build 
 filter queries for that last range ... 
 probably should have it anyway to build filter queries on between and after.

It might be helpful to output the value of start also, especially if it was 
specified as an offset of NOW.

 should the ranges used to compute the between and after counts depend on 
 where the last range ended or on the literal end param?

I suppose this will depend on the value of hardend, if true then use the 
end value, otherwise use the end of the last gap.

 8) the NOW variance really bugs me ...

Sounds like a pretty nasty problem affecting more than just this date facet.  I 
know Solr is not a RDBMS, but I always assumed that NOW would be constant 
throughout the life of a query.  Definitely something to think about as a 
seperate issue though.


 Date based Facets
 -

 Key: SOLR-258
 URL: https://issues.apache.org/jira/browse/SOLR-258
 Project: Solr
  Issue Type: New Feature
Reporter: Hoss Man
Assignee: Hoss Man
 Attachments: date_facets.patch, date_facets.patch, date_facets.patch, 
 date_facets.patch, date_facets.patch


 1) Allow clients to express concepts like...
 * give me facet counts per day for every day this month.
 * give me facet counts per hour for every hour of today.
 * give me facet counts per hour for every hour of a specific day.
 * give me facet counts per hour for every hour of a specific day and 
 give me facet counts for the 
number of matches before that day, or after that day. 
 2) Return all data in a way that makes it easy to use to build filter queries 
 on those date ranges.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (SOLR-275) PHP Serialized Response Writer

2007-06-26 Thread Tristan Vittorio (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tristan Vittorio updated SOLR-275:
--

Attachment: PHPResponseWriter.java

Updated version of the original PHPResponseWriter.java patched to compile in 
the current svn trunk and fix a bug that caused corrupted serialized data when 
score was not included in the return fields list.

 PHP Serialized Response Writer
 --

 Key: SOLR-275
 URL: https://issues.apache.org/jira/browse/SOLR-275
 Project: Solr
  Issue Type: New Feature
  Components: clients - php
Affects Versions: 1.2
Reporter: Nick Jenkin
Priority: Minor
 Attachments: PHPResponseWriter.java, PHPResponseWriter.java


 A PHP response writer that returns a serialized array that can be used with 
 the PHP function unserialize ( http://php.net/unserialize )
 Built off the JSON Writer
 I was not sure if this should be merged with 
 https://issues.apache.org/jira/browse/SOLR-196
 I have tried to keep code duplication very minimal, but always room for 
 improvement!
 Place PHPResponseWriter.java in src/org/apache/solr/request
 Add the below to your solrconfig.xml:
 queryResponseWriter name=php 
 class=org.apache.solr.request.PHPResponseWriter/
 Description of PHP serialization format: 
 http://www.hurring.com/scott/code/perl/serialize/

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Issue Comment Edited: (SOLR-275) PHP Serialized Response Writer

2007-06-26 Thread Tristan Vittorio (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508178
 ] 

Tristan Vittorio edited comment on SOLR-275 at 6/26/07 6:59 AM:


Hi Nick,

Thanks for submitting your PHPResponseWriter code, it seems to work pretty 
well, however I needed to made a couple of minor changes to get it to compile 
with the current svn trunk:

27,28c27,28
 import org.apache.solr.util.NamedList;
 import org.apache.solr.util.SimpleOrderedMap;
---
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.SimpleOrderedMap;

The updated code I submitted also fixes a bug that caused the serialized data 
to be corrupt when score was not included in the return fields list:

162c162
 writer.write(a:4:{);
---
 writer.write(a:+(includeScore ? 4 : 3)+:{);

since if score was not included, the response array contained only three 
values rather than four.

Hopefully we can get a few more people testing this code thoroughly to make 
sure it works in all cases, since the PHP unserialize() function is very 
unforgiving on badly formatted data!

cheers,
Tristan


 was:
Updated version of the original PHPResponseWriter.java patched to compile in 
the current svn trunk and fix a bug that caused corrupted serialized data when 
score was not included in the return fields list.

 PHP Serialized Response Writer
 --

 Key: SOLR-275
 URL: https://issues.apache.org/jira/browse/SOLR-275
 Project: Solr
  Issue Type: New Feature
  Components: clients - php
Affects Versions: 1.2
Reporter: Nick Jenkin
Priority: Minor
 Attachments: PHPResponseWriter.java, PHPResponseWriter.java


 A PHP response writer that returns a serialized array that can be used with 
 the PHP function unserialize ( http://php.net/unserialize )
 Built off the JSON Writer
 I was not sure if this should be merged with 
 https://issues.apache.org/jira/browse/SOLR-196
 I have tried to keep code duplication very minimal, but always room for 
 improvement!
 Place PHPResponseWriter.java in src/org/apache/solr/request
 Add the below to your solrconfig.xml:
 queryResponseWriter name=php 
 class=org.apache.solr.request.PHPResponseWriter/
 Description of PHP serialization format: 
 http://www.hurring.com/scott/code/perl/serialize/

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-196) A PHP response writer for Solr

2007-06-21 Thread Tristan Vittorio (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12507078
 ] 

Tristan Vittorio commented on SOLR-196:
---

Hi Paul,

Thanks for your work on the PHP response writer, I've applied your patch to the 
current svn trunk (revsion 549649) and manage to get it working only one minor 
change to PHPResponseWriter.java on line 23:

- import org.apache.solr.util.NamedList;
+ import org.apache.solr.common.util.NamedList;

Have you managed to get any further in developing this response writer or the 
Solr client classes you mention in your previous comment?  I have been looking 
for a response writer that created serialized php data rather than eval-able 
code, perhaps it would be easy to adapt the code in this patch to support this? 
 (I will take a look however my Java skill are not too strong yet).

cheers,
Tristan


 A PHP response writer for Solr
 --

 Key: SOLR-196
 URL: https://issues.apache.org/jira/browse/SOLR-196
 Project: Solr
  Issue Type: New Feature
  Components: clients - php, search
Reporter: Paul Borgermans
 Attachments: SOLR-192-php-responsewriter.patch


 It would be useful to have a PHP response writer that returns an array to be 
 eval-ed directly. This is especially true for PHP4.x installs, where there is 
 no built in support for JSON.
 This issue attempts to address this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.