Growing Successful Communities

0
Occasional Advisor
alexb

Wild cards doubt

[ Edited ]
08-27-2009 02:37 AM

Folks,

 

Does anyone know what symbols does Lithium see as wild cards and will these be allowed in the search text provided by the user?

 

Thanks in advance, Alex Blanco.

Lithium Guru
TashinaK

Re: Wild cards doubt

08-27-2009 03:19 PM

Hi Alex,

 

In most cases below I am only using quotation marks to show what you would type in the search box. You don't need the quotes when doing the search.

 

* is the multi-character wildcard and ? is the single character wildcard (neither works as first character in a search). So "th?s" will give you results for "this" and "thus". If you search for "th*s" you would also get longer words like "thanks".

 

 ~ is for proximity. So if you want the word "there" and "problem" but only if they are within 5 words of each other, that's: "there problem" ~5   [in this case, you have to use the quotation marks in the search]

 

~ also works as a rough search - so if you look for  "soft~" you might get "loft" and "sort"

 

Search uses most Booleans like NOT, AND, OR - so "hello OR goodbye" will give you results containing hello or goodbye.

 

Hope this helps.

 

 

0
Lithium Guru
PrenticeW

Re: Wild cards doubt

08-27-2009 05:46 PM

Hi Alex,

 

To expand upon Tashina's post, Lithium uses the Lucene search engine.

 

From the Lucene website:

 

Wildcard Searches

Lucene supports single and multiple character wildcard searches within single terms (not within phrase queries).

To perform a single character wildcard search use the "?" symbol.

To perform a multiple character wildcard search use the "*" symbol.

The single character wildcard search looks for terms that match that with the single character replaced. For example, to search for "text" or "test" you can use the search:

te?t

Multiple character wildcard searches looks for 0 or more characters. For example, to search for test, tests or tester, you can use the search:

test*

You can also use the wildcard searches in the middle of a term.

te*t

Note: You cannot use a * or ? symbol as the first character of a search.

 

Hope that helps!

 

Prentice

 

 

 

 

0
Occasional Advisor
alexb

Re: Wild cards doubt

08-28-2009 04:06 AM

Tashina, Prentice, thank you very much. I'll mark the question as solved!

0
Lithium Guru
JakeR

Re: Wild cards doubt

[ Edited ]
08-30-2009 02:21 PM

 


prenticew wrote:

 

To expand upon Tashina's post, Lithium uses the Lucene search engine.

 

 

 


 

Not to put too fine of a point on it because Prentice is absolutely correct in what he shares, but our Search is actually built upon the Lucene search engine.  We have spent a fair amount of time customizing it over the years, manipulating various algorithms, etc. 

 

I add this note only because if any readers inquire as to why Lithium Search behaves slightly different at times than an out-of-the-box Lucene search instance, it is because we have modified it as such.

 

*** If you find my post helpful, and it answers your question, please mark it as an "Accepted Solution"***
0
Valued Contributor
JohnnyJigsaw

Re: Wild cards doubt

08-31-2009 01:26 PM

Does this also include words in the smut filter and keyword filters?

Meaning:

If I put *smut* into the filter, will it grab words that have "smut" in it at any point?

 

-John

 

very good posts by the way. :smileyhappy:

"May The Community Be With You"
Lithium Guru
BrianO

Re: Wild cards doubt

09-02-2009 09:22 PM

 


JohnnyJigsaw wrote:

Does this also include words in the smut filter and keyword filters?

Meaning:

If I put *smut* into the filter, will it grab words that have "smut" in it at any point?

 

-John

 

very good posts by the way. :smileyhappy:


 

 

Yes, smut and keyword filters do allow you to use the * wildcard (I am not sure about the others, since filters are a different feature than search). Just be very careful how you use wildcards in the smut filter - I have seen things go terribly wrong when well-intentioned filter terms are added.

 

One such example is *ass* or ass*. Just think about all of the words in the dictionary that contain that string of three letters and are not vulgar or inappropriate (1250 words according to this site). Needless to say, you can literally cripple a community with an ill-advised or malformed filter term.

0
Lithium Guru
AdamN

Re: Wild cards doubt

09-03-2009 06:30 AM

Hey John,

 

I just wanted to add on to Brian's point about being careful what you add to the smut filter. What i've found to be particularly helpful is to give words you're unsure about a trial run in the keyword filter. You can configure the keyword filter to notify you upon the match of a keyword term, rather than to immediately filter the term.

 

With these notifications, you can determine whether the term should be removed from the post, or if the post can remain as-is. Then, after about a week or so of reviewing the notifications, you can begin to get a good sense of how many uses are legitimate vs how many uses are not. If you decide the that the term is abused far more than it is used appropriately, then you'll probably want to move the term from the keyword filter to the smut filter. Otherwise, you can keep the term in the keyword filter to make it easier to monitor future uses of the term.

 

I also wanted to point out that if you want a bit more control over what is filtered, the filters do support the use of regular expressions. To do this, prefix your regular expression with r: and enter it into the filter list just like a normal term.

 

I hope this helps!

 

-Adam