Searching for multiple parameters in URL using JQL - sql

I am new to Jira and am trying to understand JQL. I have been trying to figure out a way by which I can search for multiple parameters in a URL using the '%' wild card char using JQL.
So here's the sample JQL I am running in the advanced search section :-
"Business Unit/Domain" = "My Back Window" AND "PoC URL" ~ "%q=mm&start=%"
Now there are several URLs of the form
http://www.myhouse.com/index/refine?q=mm&start=0;xyz
Now when I do the above JQL i get the above URL as the result. But if I change the JQL to something like :-
"Business Unit/Domain" = "My Back Window" AND "PoC URL" ~ "%q=mm%"
I do not get any results at all. Logically using the 'like(~)' operator and the wild card char, '%', in the above fashion should also give me the result that I received from the former JQL, right ?
I come from the SQL background and am trying to assume that JQL is quite similar to SQL, unless of course I am missing something.
So what am I missing here ? Why don't I get the expected result and if this is the way JQL works then please advice a suitable work around for doing what is intended as indicated in the latter JQL. (That is searching for multiple parameters in a URL using ~ and % in JQL).

Why are you using '%' character? This is a reserved character in JQL and you also do not need it - you can just type "q=mm&start="
"Business Unit/Domain" = "My Back Window" AND "PoC URL" ~ "q=mm"
There is also a bug which prevents searching for terms which contain special characters even if properly escaped
https://jira.atlassian.com/browse/JRA-25092
See this page for more information:
https://confluence.atlassian.com/display/JIRA/Performing+Text+Searches

Related

How to include the query filter in URL (cloudSearch)

I am trying to retrieve data from cloudSearch, searching for the word "Person" and adding the following filter:
(prefix field=claimedgalleryid '')
The problem is that I don't know how to create the URL using that exact filter.
Could someone give me a suggestion or some link to Amazon documentation related to this topic?
What I've tried and didn't work:
...search?q=Gallerist&size=10&start=0&fq=(prefix%20field=claimedgalleryid%20%27%27)
...search?q=Gallerist&size=10&start=0&filter=(prefix%20field=claimedgalleryid%20%27%27)
You were close with your first attempt--it looks like you forgot to URI encode the = sign as %3D. Try this instead:
&fq=(prefix+field%3Dclaimedgalleryid+'')
I highly recommend using the "test search" feature to work out the kinks in your query syntax. You can see the results right there, and then use the "View Raw: JSON" link to copy the full request URL and see how characters get escaped and such.

Appcelerator Cloud Services - Find string in photos object custom field

I'm having trouble using the query/search capabilities of Cloud.photos, more specifically, finding a way of search for a string in title field.
After reading this: http://docs.appcelerator.com/cloud/latest/#!/guide/search_query, I was able to perform querys with $regex:
where: {title: {'$regex' : '^' + searchterm}},
But works only if the search term is in the beginning of the title, and it's case sensitive (I'm obviously a complete regex newbie).
Also tried search API with no luck. I didn't find which were the searchable fields.
So, I'm in some sort of dead end. I'm looking for a SQL like similar funcionality, where I can perform a search of a term and if matches regardless of the position and whether it is upper or lower case.
Thanks in advance.
see the release notes here for 11 Apr 2013
http://docs.appcelerator.com/cloud/latest/#!/guide/acs_releasenotes
it cannot be done any other way because the query would be too inefficient

How do I access the "See Also" Field in the Wiktionary API?

Many of the Wiktionary pages for Chinese Characters (Hanzi) include links at the top of the page to other similar-looking characters. I'd like to use the Wiktionary API to send a single character in the query and receive a list of similar characters as the response. Unfortunately, I can't seem to find any query that includes the "See Also" field. Is this kind of query possible?
The “see also” field is just a line of wiki code in the page source, and there is no way for the API to know that it's different from any other piece of text on the page.
If you are happy with using only the English version of Wiktionary, you can fetch the wikicode: index.php?title=太&action=raw, and then parse the result for the template also. In this case, the line you are looking for is {{also|大|犬}}.
To check if the template is used on the page at all, query the API for titles=太&prop=templates&tltemplates=Template:also
Similar templates are avilable in more language editions of Wiktionary, in case you want to use other sources than the English one. The current list is:
br:Patrom:gwelet
ca:Plantilla:vegeu
cs:Šablona:Viz
de:Vorlage:Siehe auch
el:Πρότυπο:δείτε
es:Plantilla:desambiguación
eu:Txantiloi:Esanahi desberdina
fi:Malline:katso
fr:Modèle:voir
gl:Modelo:homo
id:Templat:lihat
is:Snið:sjá einnig
it:Template:Vedi
ja:テンプレート:see
no:Mal:se også
oc:Modèl:veire
pl:Szablon:podobne
pt:Predefinição:ver também
ru:Шаблон:Cf
sk:Šablóna:See
sv:Mall:se även
It has been suggested that the WikiData project be expanded to cover Wiktionary. If and when that happens, you might be able to query theWikiData API for that kind of stuff!

How to specify multiple values on siteSearch in google custom search api?

I'm using the google custom search api and want to create a search using the siteSearch:
https://www.googleapis.com/customsearch/v1?key=k&cx=cx&q=cocos2d&siteSearch=www.cocos2d-iphone.org&siteSearchFilter=i
and it works fine (returns all the result only from the given site).
Then I want to specify TWO sites to search so I tried to change the :
siteSearch=www.cocos2d-iphone.org
to
siteSearch=www.cocos2d-iphone.org www.XXXXXXXX.org
siteSearch=www.cocos2d-iphone.org|www.XXXXXXXX.org
siteSearch=www.cocos2d-iphone.org||www.XXXXXXXX.org
but none of these works.
hope someone can help here, thanks:)
Currently I don't believe you can specify more site through the query param siteSearch.
nevertheless you can configure your Custom Search Engine here: https://www.google.com/cse/manage/all
in the "Site to search" area.
This also works for excluding, as you can read here: https://support.google.com/customsearch/bin/answer.py?hl=en&answer=2631038&topic=2601037&ctx=topic
You cannot do this with the as_sitesearch parameter as that only accepts a single value. But you can achieve what you want with the as_q parameter, setting it to some value like: "site:google.com OR site:microsoft.com" - that will work in a similar way to this search.
The as_q parameter is documented here as:
The as_q parameter provides search terms to check for in a document.
This parameter is also commonly used to allow users to specify
additional terms to search for within a set of search results.
Examples q=president&as_q=John+Adams
Use "space" as seperator
Below is sample PHP code which works for me
$url="https://www.googleapis.com/customsearch/v1?key=k&cx=cx&q=cocos2d&siteSearch=".urlencode("www.cocos2d-iphone.org www.XXXXXXXX.org")."&siteSearchFilter=i"
Thanks,
Ojal Suthar

Lotus Domino database FTSearch method and brackets

I need to search with FTSearch something like this - MS004790(419411/10). But it thorws NotesException: Notes error: Query is not understandable (MS004790(419411/10))
So maybe there is some trick to search strings like that or maybe I need to parse it somehow?
Tnx for help!
TL;DR: Wrap your search in quotes.
Full Text search has two modes. Web Search and Notes Search. In your notes preferences you can set this.
Web search is just like a text search. Notes search attempts to parse the search term.
However the client can fall back to Notes search terms if it sees the first characters are capitals (or capital reserved keywords like "FIELD"). So to prevent it from parsing you need to wrap it in quotes.
For example
(LotusScript)
searchString = |"MS004790(419411/10)"|
(Java)
searchString = "\"MS004790(419411/10)\""
If it is still failing after that, manually try the search in the FT search bar. Once you have that working the code should work the same way.
If it is still failing at that point it may be related to the UNK table. If so see the following:
Lotus Domino: After changing TYPE of a field, Full Text Search won't work for this field