TableSorter consecutive search - tablesorter

It appears that tablesorter needs filter terms to match consecutively.
For example:
A column contains: "Safe Rigging Practices for Seafarers"
Filter:
"Safe" returns the column
"Safe Rigging" returns the column
"Safe Practices" does not return the column.
Is there an option to change this behavior?

When you use a basic filter search, it only looks for a match of the query (from left-to-right), as you have stated above.
The filter widget also includes several different search types. See a full list in the docs at the top of this demo page. Here are several ways to get the results you desire:
As #vesuvious guessed, the search also supports wildcards, but in this case it uses an asterisk (*) to replace entire words (not including spaces). So try searching for:
Safe * Practices
You could also use a logical AND by separating words using two ampersands (&&), or the word "and" (case insensitive). Both must be surrounded by spaces:
Safe && Practices
Safe and Practices
Lastly, you can use a fuzzy search to get the result by starting the search with a tilde (~):
~Safe Practices

Related

OR Operator in Google Sheets Not Working?

This is the formula I am working on right now:
=FILTER(Data!A:K, SEARCH("Gretsch", Data!F:F)+SEARCH("Krutz", Data!F:F))
I'm trying to bring in both rows that include "Gretsch" and rows that include "Krutz". Just using one of those instead of both works just fine, and using keywords that the other has included in it's results (for example, searching just Gretsch brings up 10 or so (out of the 100+) products that include "Streamliner" in the F Column, as well as Gretsch, so using this formula:
=FILTER(Data!A:K, SEARCH("Gretsch", Data!F:F)+SEARCH("Streamliner", Data!F:F))
brings up the 10 or so products with both, but I'm looking for one OR the other, so why is that '+' acting like an AND operator instead? Am I just completely off base?
SEARCH returns a number: the starting position where a string is found within another string. It's not a simple 1 like other tests for TRUE, and there is no 0 case (i.e., FALSE) as you have it written. In addition, if either SEARCH does not find the target string, it returns an error; and a number plus an error... returns an error (which is not TRUE and therefore will not be included in the FILTER).
A better approach to achieving OR with FILTER:
=FILTER(Data!A:K, REGEXMATCH(LOWER(Data!F:F),"gretsch|krutz"))
The pipe symbol ("|") means OR in this context, and you may list as many pipe-separated strings as you like. Notice that the search range is wrapped in LOWER and that the terms to search are also lowercase; this assures the same kind of caps-agnostic search you were looking for with SEARCH.
By the way, based on your other recent post, you can also use REGEXMATCH with NOT, e.g.:
=FILTER(Data!A:K, REGEXMATCH(LOWER(Data!F:F),"gretsch|krutz"), NOT(REGEXMATCH(LOWER(Data!F:F),"case")))
One additional note: Your post is tagged "Excel" and "Google Sheets." The formulas I've proposed will only work with Google Sheets. In most cases by far, it is best to tag a post here with either "Excel" or "Google Sheets" but not both, since the differences are substantial between the two.
try:
=QUERY(Data!A:K, "where lower(F) contains 'gretsch'
or lower(F) contains 'krutz'")

Querying lucene index with arbitrary long article text to check for all matches within article (through neo4j)

I'm trying to query the lucene index I've added to a neo4j field (it's a "name" field, that isn't very long, one to ten words at most).
What I do right now is take all the text in a given webpage, sanitize it with a javascript function to keep only words, spaces and alphanumeric characters, and use that to query my index.
.replace(/[^\w\s]|or|and|not|return+/gi, "") // <- escaping the input
I'm not sure if the length of the search text is limited somehow, but results do seem to disappear after about 1050 words (~6500 characters).
Ideally, I'd like to be able to use a couple thousand words in one query, with the end goal of highlighting the matches found within the webpage itself.
Why is my query not returning any results past a certain number of characters ? Am I missing some keyword in my escaping regex ?
Is what I'm trying to achieve feasible ? Is there a better approach I could use ?
Thanks for reading :)
(for anyone finding this, I found a somewhat related question here: Handling large search queries on relatively small index documents in Lucene)

JQL actual "contains"

I want to perform a simple search on a text field with part of its content but I don't know the beginning. I basically want what someone would expect of a "contains search". If I search issue for 345, I would want this result:
123456
234567
345678
...
Which, in JQL, would be the result of the query issue ~ "*345*", but the * is not allowed as first character in wildcard query. Is there an easy way to get this result, preferably with a JQL query?
Right now it's impossible to search JIRA for contains operation. As described in Search syntax for text fields, JIRA support Word stemming:
Since JIRA cannot search for issues containing parts of words, word
'stemming' allows you to retrieve issues from a search based on the
'root' (or 'stem') forms of words instead of requiring an exact match
with specific forms of these words. The number of issues retrieved
from a search based on a stemmed word is typically larger, since any
other issues containing words that are stemmed back to the same root
will also be retrieved in the search results.
That means, that you can search for common root of some word, but can't search for arbitrary part of it.
There is an issue in official JIRA bug tracker: Allow searching for part of a word (prefix / substring searches), which describes why this can't be implemented:
Lucene doesn't support prefix search.
As a workaround the suggestion is to use Script Runner plugin for JIRA:
issueFunction in issueFieldMatch("project = JRA", "description", "ABC\\d{4}")
See more on IssueFieldMatch here.
Another plugin, which can do regex jql is JQL Search Toolkit.
Filter issues by "345" substring in the Summary field:
summary ~ "345"
Filter issues by "345" substring in the Description field:
description ~ "345"

use of + sign in Google Adwords

I want to do a phrase match search like "warrenton home values" but I'd like to make sure home+values stay in that order but can be switched so that "home values warrenton" and "warrenton home values" will both trigger.
I thought the + sign would "chain" the two words, home+values together but after a chat with a Google rep I find myself more confused than before. What is the best way to achieve this?
Will this phrase also trigger warrenton island home values keyword search or does the use of quotes only match words found within the quotes? I need to make sure I keep warrenton in the search phrase to avoid wasting budget on triggering ads outside of the geographic area.
You can add a modifier, the plus sign on your keyboard (+), to any of the terms that are part of your broad match keyword phrase. By adding a modifier, your ads can only show when someone's search contains those modified terms, or close variations of the modified terms, in any order. The modifier won't work with phrase match or exact match keywords.
Example: +women's +hats
Example Search: hats for women
Unlike broad match keywords, modified broad match keywords won't show your ad for synonyms or related searches. For this reason, it adds an additional level of control. Using broad match modifier is a good choice if you want to increase relevancy even if it means you might get less ad traffic than broad match.
More information here: https://support.google.com/adwords/answer/2497836?hl=en&authuser=1

Google Search Appliance wildcard character support

Does Google Search Appliance support wildcard characters in the query string. If no, is there any way I can fetch all the result set through my query?
The GSA does not support wildcarding. An option can be toN-Gram the fields or content that you want wildcarded. This would be achieved in your feeder or pipeline.
If waiting and upgrading the gsa software to v 7.2,.coming mid December is an option you will have wild card search built in.
Otherwise you have to dig deeper. A possible option is a document filter. If you are interested in that option I might be able to help.
I have developed such a document filter.
GSA software 7.4 has wildcard search built in. From documentation:
Enabling Wildcard Search
Wildcard search is a feature that enables your users to search by entering a word pattern rather than the exact spelling of a term. The search appliance supports two wildcard operators:
*--Matches zero or more characters
?--Matches exactly 1 character
Using wildcards can simplify queries for long names, technical data, pharmaceutical information, or strings where the exact spelling varies or is unknown. A user can search for all words starting with a particular pattern, ending with a particular pattern, or having a particular substring pattern.
By default, wildcard indexing is disabled for your search appliance. You can enable or disable wildcard indexing by using the Index > Index Settings page. You can disable or enable wildcard search for one or more front ends by using the Filters tab of the Search > Search Features > Front Ends page.
One way to get all indexed items from a collection is to use a query that will match every indexed record, e.g., supposing you're indexing some set of URLs from subdomain.companyname.com, just query for "companyname", with the "&num=1000&filter=0" query string parameters.

Resources