Lucene queries

classic Classic list List threaded Threaded
33 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Lucene queries

fschmidt
Administrator
closing
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
Reply | Threaded
Open this post in threaded view
|

Re: Lucene queries

fschmidt
Administrator
In reply to this post by fschmidt
I want to really fix queryparser and get rid of Lucene.index.query .  I want to let users define field types for the queryparser.  I will write this code so it can used from Java too.
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
Reply | Threaded
Open this post in threaded view
|

Re: Lucene queries

fschmidt
Administrator
The lucene QueryParser is ridiculous.  Here it is:

http://lucene.apache.org/core/4_9_0/queryparser/overview-summary.html

This is much more code than all of Luan.  I want to write a QueryParser from scratch that will be simple and flexible.  I would use exactly the same syntax as the lucene QueryParser but make it much more flexible.  I think I only need a few simple classes.  I would make this a new project, maybe sane.lucene.queryparser .  This requires focus, so I would work on it when I get back home.  Okay?
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
Reply | Threaded
Open this post in threaded view
|

Re: Lucene queries

Hugo <Nabble>
Okay, it sounds good.
Reply | Threaded
Open this post in threaded view
|

Re: Lucene queries

fschmidt
Administrator
To handle the many changes, I will implement something like our Java DbUpdate.  If you have any comments, you can post here.  I will do this after shabbat.
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
Reply | Threaded
Open this post in threaded view
|

Re: Lucene queries

Hugo <Nabble>
You can go ahead. I believe each step will be a loop through selected documents (e.g., all users that have a given field null) then fix and save them.
Reply | Threaded
Open this post in threaded view
|

Re: Lucene queries

fschmidt
Administrator
This is done.  You can see luanforum rev 48f41e9016ba to see how to use it.  But it is a lot of changes, so you might want to discuss it with me.
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
Reply | Threaded
Open this post in threaded view
|

Re: Lucene queries

Hugo <Nabble>
I've updated my code and things work smoothly.

Why
String.string_to_number()
String.string_to_binary()
instead of
String.to_number()
String.to_binary()
?
Reply | Threaded
Open this post in threaded view
|

Re: Lucene queries

fschmidt
Administrator
Hugo <Nabble> wrote
Why
String.string_to_number()
String.string_to_binary()
instead of
String.to_number()
String.to_binary()
?
This is because of how I typically use locals for functions.  But I can change the names if you prefer.
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
Reply | Threaded
Open this post in threaded view
|

Re: Lucene queries

Hugo <Nabble>
I think the short names are better and more standard. In your code you could do:
local string_to_number = String.to_number
local string_to_binary = String.to_binary
Reply | Threaded
Open this post in threaded view
|

Re: Lucene queries

fschmidt
Administrator
done in rev f4dfe9c64c25
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
Reply | Threaded
Open this post in threaded view
|

Re: Lucene queries

Hugo <Nabble>
Thanks, much better.
Reply | Threaded
Open this post in threaded view
|

Re: Lucene queries

fschmidt
Administrator
closing
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
12