[Xapian-discuss] Searching in different fields

Felix Antonius Wilhelm Ostmann ostmann at websuche.de
Wed Dec 27 09:21:08 GMT 2006


Hmmm ... i am not shure, but perhaps you can use a hack:

enter the username many times :)

smaarten3 =>
XUsmaarten3, XUmaarten3, XUaarten3, XUarten3, XUrten3, XUten3, XUen3, 
XUn3, XU3

for one field with termlength ~ 10 digits it should be userfull.
Perhaps you must use a speciall prefix like XUS for the short notations.

i dont know how you get this feature with omega :(
i dont know this is a good way *g* Olly? :)


MfG
Felix Antonius Wilhelm Ostmann


M.J. van der Veen schrieb:
> What about searching different fields?
>
> Regards,
>
> Maarten
>
> On 12/25/06, Jim <k4gvo at bellsouth.net> wrote:
>> I'm afraid you are partially out of luck.  The Xapian query parser has a
>> wildcard (http://xapian.org/docs/queryparser.html) but it's only for
>> trailing values.  You could search for maarten* and get maarten123, but
>> there doesn't appear to be a way to get smaarten.
>>
>> Jim.
>>
>> M.J. van der Veen wrote:
>> > Hi,
>> >
>> > I'm trying to index some user information and then search it. I want
>> > to be able to search for instance a username, with the equivalent of
>> > searching with LIKE '%name%' in a SQL language.
>> >
>> > I've created the following index file:
>> > userid                  :    boolean=Q unique=Q field=userid
>> > username        :    index=XU index field=username
>> > name              :    index=XN index field=name
>> > city             :    index=XC index field=city
>> > province           :    boolean=XPR
>> > gender              :    boolean=XG
>> > avatar            :    boolean=XP
>> > birthday              :    boolean=D
>> > birthmonth           :    boolean=M
>> > birthyear             :    boolean=Y
>> > birthdate        :    value=1
>> > question        :    index=XQ weight=3 index field=question
>> > text              :    unhtml index
>> > style            :    boolean=XS
>> >
>> >
>> > And I filled the database with this data.
>> >
>> > Now, I want to search for users whose name is something like
>> > 'maarten', but can be 'maarten123' or 'smaarten3' aswell.
>> >
>> > I'm not sure how to do this. I have specified fields, but I'm unsure
>> > how to use these. Can anyone explain how to search within specific
>> > fields?
>> >
>> > Thanks,
>> >
>> > Maarten
>> >
>> > _______________________________________________
>> > Xapian-discuss mailing list
>> > Xapian-discuss at lists.xapian.org
>> > http://lists.xapian.org/mailman/listinfo/xapian-discuss
>> >
>>
>>
>> _______________________________________________
>> Xapian-discuss mailing list
>> Xapian-discuss at lists.xapian.org
>> http://lists.xapian.org/mailman/listinfo/xapian-discuss
>>
>
> _______________________________________________
> Xapian-discuss mailing list
> Xapian-discuss at lists.xapian.org
> http://lists.xapian.org/mailman/listinfo/xapian-discuss
>
>


-- 
Mit freundlichen Grüßen

Felix Antonius Wilhelm Ostmann
--------------------------------------------------
Websuche   Search   Technology   GmbH   &   Co. KG
Martinistraße 3  -  D-49080  Osnabrück  -  Germany
Tel.:   +49 541 40666-0 - Fax:    +49 541 40666-22
Email: info at websuche.de - Website: www.websuche.de
--------------------------------------------------
AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310
Komplementärin:     Websuche   Search   Technology
Verwaltungs GmbH   -  AG Osnabrück  -   HRB 200359
Geschäftsführer:  Diplom Kaufmann Martin Steinkamp
--------------------------------------------------




More information about the Xapian-discuss mailing list