Re: Advanced Search sort-by-date options - available from the regular search syntax?

2010-08-29 Thread Jeff Marshall
I've added support for the following two control strings on basic queries:

   sort:newest
   sort:oldest

Here is an example search on the [email protected] list using "help
sort:newest":

   http://www.mail-archive.com/search?l=gossip%40jab.org&q=help+sort:newest


To answer your question about date formats, we are using the Python dateutil
module to parse the date string:

   http://labix.org/python-dateutil

It handles parsing almost any date format.  We are using the default
parameters, which means the precedence on an ambigious month / day / year
order is this:


http://labix.org/python-dateutil#head-b95ce2094d189a89f80f5ae52a05b4ab7b41af47

   MM-DD-YY
   DD-MM-YY
   YY-MM-DD


You followed up directly with me with a couple more good points.

1) When doing a basic search with a special field like "from:jeff" and then
clicking to the Advanced Search should move those special fields to the
appropriate form elements.  I will work on this.

2) Sorting by Date Oldest instead of only Date Newest.  I added this support
on those special commands I mentioned at the start of this email.  It's not
in the Advanced Search UI yet because we don't have the translation strings
for all the languages for this...

Jeff


On Sat, Aug 28, 2010 at 8:46 PM, Jeff Marshall  wrote:

> Hi Esther, thanks for the suggestions.
>
>
> > I really like the sort by date option that comes up from the Advanced
> page search, but I'm curious whether there's any way to implement this as a
> switch or option keyword from the regular search query.
>
> We should be able to add a special keyword to the regular search query to
> do the sort-by-date.  I'll try to work on this over the weekend.
>
>
> > if the box is left empty, but the button has been changed from the
> default "1 day" setting, is it possible for the program to search within the
> specified date range, assuming that the date argument is "today"?
>
> Interesting idea.  I'm not sure this would be intuitive to people, but
> perhaps there is a way to add support for something like that and make it
> obvious to people what the date search will do in that case.
>
>
> > For date syntax, does the format (8/14/03) always default to
> month/day/year, or is there a way for people to use day/month/year as a
> preference?
>
> I'll have to double-check the date parsing code to let you know.
>
>
> Jeff
>
>
>
> On Fri, Aug 27, 2010 at 11:00 AM, Esther  wrote:
>
>> Hi Jeff,
>>
>> I really like the sort by date option that comes up from the Advanced page
>> search, but I'm curious whether there's any way to implement this as a
>> switch or option keyword from the regular search query.  (From a read
>> through of the Lucene document linked in the FAQ, this doesn't seem to be an
>> option; they only note that results of range searches are sorted according
>> to lexicography.)I find it most efficient to type a simple query,
>> usually without detailed Boolean arguments or, in general, date ranges.
>>  Then, depending on the search results, I may modify my search syntax if I
>> need to refine the search, but I usually do this by adding arguments to by
>> search query rather than using the link to refine my search. Consequently, I
>> only came across the Advanced Search page option a couple of weeks ago.  The
>> feature that I'd most like to use as an add-on to the regular search string
>> is the sort by date (rather than relevance) option.  Is that possible?  It
>> looks as though the Advanced Search page is running a Python program.
>>
>> Another few questions regarding the date range: if the box is left empty,
>> but the button has been changed from the default "1 day" setting, is it
>> possible for the program to search within the specified date range, assuming
>> that the date argument is "today"?  For date syntax, does the format
>> (8/14/03) always default to month/day/year, or is there a way for people to
>> use day/month/year as a preference?  (This question is being asked because
>> some International list members may prefer to use that syntax, and I was
>> wondering whether there a way that the program can check this from their
>> regional settings;  18 Jul 2006 seems to be interpreted correctly, as well.)
>>
>> Thanks very much for all your work on these archives.  I've been using
>> them since 2005, and have been pleasantly surprised by all the features that
>> keep getting added.
>>
>> Cheers,
>>
>> Esther
>>
>>
>>
>>
>> --
>> To unsubscribe, send mail to [email protected].
>>
>
>


Re: Advanced Search sort-by-date options - available from the regular search syntax?

2010-08-28 Thread Jeff Marshall
Hi Esther, thanks for the suggestions.


> I really like the sort by date option that comes up from the Advanced page
search, but I'm curious whether there's any way to implement this as a
switch or option keyword from the regular search query.

We should be able to add a special keyword to the regular search query to do
the sort-by-date.  I'll try to work on this over the weekend.


> if the box is left empty, but the button has been changed from the default
"1 day" setting, is it possible for the program to search within the
specified date range, assuming that the date argument is "today"?

Interesting idea.  I'm not sure this would be intuitive to people, but
perhaps there is a way to add support for something like that and make it
obvious to people what the date search will do in that case.


> For date syntax, does the format (8/14/03) always default to
month/day/year, or is there a way for people to use day/month/year as a
preference?

I'll have to double-check the date parsing code to let you know.


Jeff



On Fri, Aug 27, 2010 at 11:00 AM, Esther  wrote:

> Hi Jeff,
>
> I really like the sort by date option that comes up from the Advanced page
> search, but I'm curious whether there's any way to implement this as a
> switch or option keyword from the regular search query.  (From a read
> through of the Lucene document linked in the FAQ, this doesn't seem to be an
> option; they only note that results of range searches are sorted according
> to lexicography.)I find it most efficient to type a simple query,
> usually without detailed Boolean arguments or, in general, date ranges.
>  Then, depending on the search results, I may modify my search syntax if I
> need to refine the search, but I usually do this by adding arguments to by
> search query rather than using the link to refine my search. Consequently, I
> only came across the Advanced Search page option a couple of weeks ago.  The
> feature that I'd most like to use as an add-on to the regular search string
> is the sort by date (rather than relevance) option.  Is that possible?  It
> looks as though the Advanced Search page is running a Python program.
>
> Another few questions regarding the date range: if the box is left empty,
> but the button has been changed from the default "1 day" setting, is it
> possible for the program to search within the specified date range, assuming
> that the date argument is "today"?  For date syntax, does the format
> (8/14/03) always default to month/day/year, or is there a way for people to
> use day/month/year as a preference?  (This question is being asked because
> some International list members may prefer to use that syntax, and I was
> wondering whether there a way that the program can check this from their
> regional settings;  18 Jul 2006 seems to be interpreted correctly, as well.)
>
> Thanks very much for all your work on these archives.  I've been using them
> since 2005, and have been pleasantly surprised by all the features that keep
> getting added.
>
> Cheers,
>
> Esther
>
>
>
>
> --
> To unsubscribe, send mail to [email protected].
>


Advanced Search sort-by-date options - available from the regular search syntax?

2010-08-27 Thread Esther

Hi Jeff,

I really like the sort by date option that comes up from the Advanced  
page search, but I'm curious whether there's any way to implement this  
as a switch or option keyword from the regular search query.  (From a  
read through of the Lucene document linked in the FAQ, this doesn't  
seem to be an option; they only note that results of range searches  
are sorted according to lexicography.)I find it most efficient to  
type a simple query, usually without detailed Boolean arguments or, in  
general, date ranges.  Then, depending on the search results, I may  
modify my search syntax if I need to refine the search, but I usually  
do this by adding arguments to by search query rather than using the  
link to refine my search. Consequently, I only came across the  
Advanced Search page option a couple of weeks ago.  The feature that  
I'd most like to use as an add-on to the regular search string is the  
sort by date (rather than relevance) option.  Is that possible?  It  
looks as though the Advanced Search page is running a Python program.


Another few questions regarding the date range: if the box is left  
empty, but the button has been changed from the default "1 day"  
setting, is it possible for the program to search within the specified  
date range, assuming that the date argument is "today"?  For date  
syntax, does the format (8/14/03) always default to month/day/year, or  
is there a way for people to use day/month/year as a preference?   
(This question is being asked because some International list members  
may prefer to use that syntax, and I was wondering whether there a way  
that the program can check this from their regional settings;  18 Jul  
2006 seems to be interpreted correctly, as well.)


Thanks very much for all your work on these archives.  I've been using  
them since 2005, and have been pleasantly surprised by all the  
features that keep getting added.


Cheers,

Esther




--
To unsubscribe, send mail to [email protected].


Re: Search syntax...

2010-02-21 Thread M. G. Devour
> I've made two fixes to the search engine:
>   - prevented duplicates from appearing in the results
>   - case-insensitivity on our special field names in searches (date,
>   from,
> subject, message)
> 
> That tidies things up nicely.
> 
> Jeff

I'll say, Jeff!

Yep, the dupes are gone. Interestingly, I've been doing lots of 
searches all evening and didn't notice when the change took place!

If I capitalize 'From:' for an author search, I see on the results page 
that the system has "corrected" my search syntax to 'from:' rather than 
turning up 0 results.

Thanks!

Mike D.

[Mike Devour, Citizen, Patriot, Libertarian]
[[email protected]]
[Speaking only for myself...   ]



-- 
To unsubscribe, send mail to [email protected].


Re: Search syntax...

2010-02-21 Thread Jeff Marshall
I've made two fixes to the search engine:
  - prevented duplicates from appearing in the results
  - case-insensitivity on our special field names in searches (date, from,
subject, message)

That tidies things up nicely.

Jeff


On Thu, Feb 18, 2010 at 10:57 PM, M. G. Devour  wrote:

> Jeff,
>
> Thanks for the overview. I'm going to be working on a new web site for
> my group, so I may attempt something like that.
>
> Mike D.
>
> > An "advanced search" form would basically have a bunch of fields like
> > "subject" and "date" and "from" then string them together into a query
> > syntax described below. Then redirect that query to the standard search
> > URL. Implementation would most likely be in PHP. Hard part isn't the
> > programming, it is designing an elegant suer friendly form that matches
> > the query syntax. Actually that isn't so hard either. Hard part is
> > making time to get it done.
>
>
>
>
> --
> To unsubscribe, send mail to [email protected].
>


Re: Search syntax...

2010-02-19 Thread M. G. Devour
Jeff,

Thanks for the overview. I'm going to be working on a new web site for 
my group, so I may attempt something like that. 

Mike D.

> An "advanced search" form would basically have a bunch of fields like
> "subject" and "date" and "from" then string them together into a query
> syntax described below. Then redirect that query to the standard search
> URL. Implementation would most likely be in PHP. Hard part isn't the
> programming, it is designing an elegant suer friendly form that matches
> the query syntax. Actually that isn't so hard either. Hard part is
> making time to get it done.




-- 
To unsubscribe, send mail to [email protected].


Re: Search syntax...

2010-02-18 Thread Jeff Breidenbach
An "advanced search" form would basically have a bunch of fields like
"subject" and "date" and "from" then string them together into a query
syntax described below. Then redirect that query to the standard search URL.
Implementation would most likely be in PHP. Hard part isn't the programming,
it is designing an elegant suer friendly form that matches the query syntax.
Actually that isn't so hard either. Hard part is making time to get it done.

http://www.mail-archive.com/faq.html#search

.


Re: Search syntax...

2010-02-18 Thread Jeff Marshall
Yes, looks like there is a problem where we are displaying double search
results.  We'll look at it this week and fix that right up.

MHonArc is all written in Perl.  Lucene is built on Java, but we use it via
a Python wrapper.  The Mail Archive's wrapping layers and sorting code is
written mostly in shell, with some PHP and Python sprinkled about.

Thanks


On Tue, Feb 16, 2010 at 6:47 PM, M. G. Devour  wrote:

> > Hi Mike.  That's a very good point about the case sensitivity on the
> > "from" and "date" directives.  I'll see what I can do to fix that.
>
> Thank you, Jeff. I figure that while it's all fresh for me, the things
> I stumble on have the best chance of helping future users. Once I'm
> used to it all I'll have a harder time seeing possible improvements.
>
> I've noticed that in almost every search I do, each message turns up
> twice, either right next to each other or separated by one or two other
> results. For instance, a search I made that had 70 results represented
> 36 unique pages, once I'd been through them all in detail. I couldn't
> see a reason for the duplication. Any thoughts as to why?
>
> More results is better than less, most likely, and the nice contrast
> between visited and unvisited page links speeds review, but it's an
> interesting effect.
>
> > It's great to hear you are enjoying the search engine.  We use Lucene
> > for the per-list search indexes; it's certainly a high quality
> > open-source engine.
>
> Yes, it's a pretty piece of code. Having it not choke on really short
> terms is basically unique in what I've seen. I remember reading that
> the index file might be a third the size of the database? If so, it's a
> worthy investment. I think we're reaping the benefit of really cheap
> storage and a text-only format...
>
> I forget... what language(s) are Mhonarc and Lucene implemented in?
> Your sorting code? If I do any coding or tweaking, it'd be nice to be
> able to offer it up for use by others. Some kind of search form has to
> be do-able, if it's not already out there.
>
> Thank you, again. Excellent work.
>
> Mike D.
>
> [Mike Devour, Citizen, Patriot, Libertarian]
> [[email protected]]
> [Speaking only for myself...   ]
>
>
>
> --
> To unsubscribe, send mail to [email protected].
>


Re: Search syntax...

2010-02-16 Thread M. G. Devour
> Hi Mike.  That's a very good point about the case sensitivity on the
> "from" and "date" directives.  I'll see what I can do to fix that.

Thank you, Jeff. I figure that while it's all fresh for me, the things 
I stumble on have the best chance of helping future users. Once I'm 
used to it all I'll have a harder time seeing possible improvements.

I've noticed that in almost every search I do, each message turns up 
twice, either right next to each other or separated by one or two other 
results. For instance, a search I made that had 70 results represented 
36 unique pages, once I'd been through them all in detail. I couldn't 
see a reason for the duplication. Any thoughts as to why?  

More results is better than less, most likely, and the nice contrast 
between visited and unvisited page links speeds review, but it's an 
interesting effect.

> It's great to hear you are enjoying the search engine.  We use Lucene
> for the per-list search indexes; it's certainly a high quality
> open-source engine.

Yes, it's a pretty piece of code. Having it not choke on really short 
terms is basically unique in what I've seen. I remember reading that 
the index file might be a third the size of the database? If so, it's a 
worthy investment. I think we're reaping the benefit of really cheap 
storage and a text-only format...

I forget... what language(s) are Mhonarc and Lucene implemented in? 
Your sorting code? If I do any coding or tweaking, it'd be nice to be 
able to offer it up for use by others. Some kind of search form has to 
be do-able, if it's not already out there.

Thank you, again. Excellent work.

Mike D.

[Mike Devour, Citizen, Patriot, Libertarian]
[[email protected]]
[Speaking only for myself...   ]



-- 
To unsubscribe, send mail to [email protected].


Re: Search syntax...

2010-02-16 Thread Jeff Marshall
Hi Mike.  That's a very good point about the case sensitivity on the "from"
and "date" directives.  I'll see what I can do to fix that.

It's great to hear you are enjoying the search engine.  We use Lucene for
the per-list search indexes; it's certainly a high quality open-source
engine.

Jeff


On Tue, Feb 16, 2010 at 6:56 AM, M. G. Devour  wrote:

> Well, I've been playing with my shiny new archive! Great stuff! 
>
> I stumbled on a less than intuitive detail of the search syntax...
>
> First I tried:
>
>   "From: M. G. Devour"
>
> ...and got messages in which I was quoted by others. Okay, not what I
> thought I was going to get, but makes sense when you read the
> instructions. 
>
> Then I moved the quotation mark and tried:
>
>   From:"M. G. Devour"
>
> ...which gave zero results. Huh?
>
> Finally, I tried the *correct* syntax:
>
>   from:"M. G. Devour"
>
> ...which turns up all of my posts, as intended.
>
> Same thing is true of date: searches. I'm curious why the from: and
> date: directives bother to be case sensitive? It tripped me up there
> for a bit!
>
> Otherwise, I've gotta say, wow, this is a powerful search facility!
>
> It is just so great to be able to use arbitrarily short search terms.
> There are so many acronyms and legitimate items in our group's jargon
> that are only 2 or 3 letters long, that the 3 letter minimum of most
> forum software as well as the archive that we used to have, is really
> crippling sometimes.
>
> Have people managed to design nice front-ends for this, similar to
> Google's advanced search form? Something like that would be extremely
> useful on our web site.
>
> Thanks, guys. This is turning out very nicely.
>
> Be well!
>
> Mike D.
>
>
>
>
>
> --
> To unsubscribe, send mail to [email protected].
>


Search syntax...

2010-02-16 Thread M. G. Devour
Well, I've been playing with my shiny new archive! Great stuff! 

I stumbled on a less than intuitive detail of the search syntax...

First I tried:

   "From: M. G. Devour"

...and got messages in which I was quoted by others. Okay, not what I 
thought I was going to get, but makes sense when you read the 
instructions. 

Then I moved the quotation mark and tried:

   From:"M. G. Devour"

...which gave zero results. Huh?

Finally, I tried the *correct* syntax:

   from:"M. G. Devour"

...which turns up all of my posts, as intended.

Same thing is true of date: searches. I'm curious why the from: and 
date: directives bother to be case sensitive? It tripped me up there 
for a bit!

Otherwise, I've gotta say, wow, this is a powerful search facility! 

It is just so great to be able to use arbitrarily short search terms. 
There are so many acronyms and legitimate items in our group's jargon 
that are only 2 or 3 letters long, that the 3 letter minimum of most 
forum software as well as the archive that we used to have, is really 
crippling sometimes.  

Have people managed to design nice front-ends for this, similar to 
Google's advanced search form? Something like that would be extremely 
useful on our web site.

Thanks, guys. This is turning out very nicely.

Be well!

Mike D.





-- 
To unsubscribe, send mail to [email protected].