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"
Related
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'")
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)
I have a problem in which I need to generate a dashboard for a large feature which comprises multiple epics. I would like to be able to search for all of the stories, maybe even technical tasks as well, under any epics which contain the feature name and return this in a search. Is there a way to do this with Jira's JQL?
Sadly, you cannot reference fields as values or functions in JQL.
If you do something like description ~ summary, it will either throw an error, or automagically quote it as description ~ "summary" and search for the string literal "summary".
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
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.