Hi,

> I installed Pootle 1.2 and the code line seems different. (the first 
> make_query is located on the line 914)
> I changed the parameter of first make_query in indexsearch to "True". 
> However it didn't work well. The result is neither OR nor AND. After 
> changing, I only got strings which contains 'pootle'.

my fault - I did not have a test setup at hand, thus my guessing went wrong ...


> > Would AND be the desired behaviour for the text search field?
> >   
> 
> I think so, if you input 'pootle server' in search window, you should 
> only get the result containing 'pootle server'.
> AND was default behavior in previous versions of Pootle.

I just commited revision 9020. It splits the search input into words (separated
by whitespace) and appends each word to the "AND" query,
I tested it with a xapian engine and with Pootle and the toolkit at revision
8822 due to some issues, that I did not investigate at that moment. But I
assume, it should work well with HEAD, too.

Just to make sure, that I did not neglect anything: is a simple "split" call the
right approach to separate words in a language neutral way?
(see line 1020 in Pootle/projects.py)


Just to clarify the current behaviour of the search field:
1) every word search is "partial" and case-insensitive - thus "poot" will find
"Pootle"
2) Multiple words get splitted into single words. The single queries are
partial, too. They are combined by "AND".
3) The order of multi-word queries does not matter: a search for "admin pootle"
will return "Pootle Languages Admin Page" (and others).
4) Multiple word input can be a mixture of source and target strings: a search
for "remove sprache" will return "Remove Language" which is translated to
"Sprache loeschen"

Do you think, that this detailed description of the search processing would be
suitable for the "searching" wiki page[1] of Pootle? Then I could add it
there ...


I would appreciate any comments!

regards,
Lars

[1] http://translate.sourceforge.net/wiki/pootle/searching

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Translate-pootle mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to