PDA

View Full Version : Wildcard search?



mads
05-28-2007, 10:53 AM
Not sure if the topic right.. but is it possible to make a "wildcard" search, where you only search for part of the word?

ex.

If i want to search for "Application" but I'm not sure how I spell it, so I only search for "app". Can I do this by setting a wildcard in front or after the word?? like *, % or something like that?

Or is it possible to change the SQL search string in the code somewhere, so it uses the LIKE command?

SteveB
05-28-2007, 03:58 PM
You can do "app*" (without the quotes) to find everything that starts with "app".

DekiWiki uses Lucene for search and indexing. For a full description of the query syntax, check out:
http://lucene.apache.org/java/docs/queryparsersyntax.html

Disclaimer: I haven't tried any of their advanced searches, but they should work. Give it a whirl and let us know!

blakeh
06-01-2009, 06:44 PM
DekiWiki uses Lucene for search and indexing. For a full description of the query syntax, check out:
http://lucene.apache.org/java/docs/queryparsersyntax.html


Dead link.
I believe that this is what you are referring to: http://lucene.apache.org/java/2_3_2/queryparsersyntax.html

SteveB
06-01-2009, 06:54 PM
Thanks for correcting the link! They must have moved since I posted it. Now, if they had used a wiki... well, this wouldn't have happened! ;)

jlpp
03-16-2010, 08:40 PM
You can do "app*" (without the quotes) to find everything that starts with "app".

DekiWiki uses Lucene for search and indexing. For a full description of the query syntax, check out:
http://lucene.apache.org/java/docs/queryparsersyntax.html

Disclaimer: I haven't tried any of their advanced searches, but they should work. Give it a whirl and let us know!

It seems that this doesn't always work and I'm wondering if I'm doing something wrong. I have a page that contains the string "-Xms256m -Xmx512m -XX:PermSize=64m -XX:MaxPermSize=128m" (quotes included). When I search for maxpermsize I get one result (correct). When I search for maxpermsiz* I get zero results (not correct). When I search for maxpermsiz? I get zero results (not correct). maxperm yields zero results (correct?). maxperm* shows one result (correct).

Any ideas why the wildcard works in some cases and not in others? There's probably a pattern in there but I'm not seeing it.

Thanks,
Jeff

tisso
03-17-2010, 08:50 AM
i tried your string and the only thing that is not correct in my eyes is that
maxpermsiz* is not working but i can imagine why. maxperms* works maxpermsi* not. I think it has something to do with the colon and or the equality sign inside the searchword.

MaxPermSize=128m again works. Lucene indexes only strings with spaces around and in your case the string would be XX:MaxPermSize=128m the "minus" is stripped away because it is the common exclude character and it looks like xx: is also stripped away as if lucene splits at the colon because xx alone is also searchable. if you want to find "-XX:MaxPermSize=128m" you have to put it into brackets.

The Problem is definitively the equality sign it somehow cripples the indexing at the end of the search word.

jlpp
03-17-2010, 02:41 PM
Thanks Tisso. I'm happy to hear that it's isolated to somewhat unusual strings like this and is not more pervasive. I guess this means that users searching through strings of unusual syntax will need to be a bit more forgiving and try a few variations of search terms and wildcards before concluding that their term truly doesn't exist in the content.

tisso
03-17-2010, 02:45 PM
maybe lucene works "better" when they update the engine in summer like announced in my thread here http://forums.developer.mindtouch.com/showthread.php?t=7507

tisso
09-22-2011, 10:23 AM
leading wildcard now possible
http://developer.mindtouch.com/en/kb/Configuration_keys_and_values?highlight=allow-leading-wildcard
changed the mindtouch.deki.startup.xml and added
<allow-leading-wildcard>true</allow-leading-wildcard> into the indexer option and restart dekiwiki service.