Case insensitive ClearQuest queries - case-insensitive

How can I make my clearquest search query case insensitive?

Here's a write-up that may provide some insight...depending on what database you're using
http://www-01.ibm.com/support/docview.wss?uid=swg21130205

Related

Django/DRF filtering

I filter my list of Product models by title field. For example, I want to find this title = 'Happy cake'. And if I type
Case 1. 'happy cake',
Case 2. 'hapy cake', happi kake'
it should return me 'Happy cake'.As I know icontains helps me with case 1. How can I get that?May be some sort of technologies should be added or django itself has appropriate solution?
You can try using the lookup __in
Model.objects.filter(title__in=['happy cake', 'happi kake'])
You can put as many test cases you want in the list.
You can do this other way.
If you are sure about the start ha here
Happy Cake
Hapy cake
happi kake
Product.objects.filter(title__startswith='ha')
This kind of question is hard to solve by just using Django inbuild search system. So this is one way to solve this question. ElasticSearch. It has fuzzy search and indexing. Cool thing to deal with tough tasks). I pushed to git some starting code. It doesn't solve this question fully, but with some workaround that goal can be achieved.

Accent insensitive search django sqlite

I am using sqlite and django. I am trying to search for accented strings stored in the sqlite database using non-accented search query.
For example: search for "Rio Grande" when the database contains "Río Grande".
I found this SO post SQLite accent-insensitive search that mentions to first create a collation and then call the search query using COLLATE NOACCENTS
This is exactly what I need. However I am not sure how to do this using django models. Any suggestions?
As suggested in this Postgres specific post on django documentation: PostgreSQL specific lookups I tried the following:
myObject.objects.filter(locationTuple__unaccent__contains='Rio Grande')
but got the following error:
FieldError: Unsupported lookup 'unaccent' for CharField or join on the field not permitted. which is understandable because this lookup might not work for sqlite.
I think this is the closest thing you're going to find, however, it needs some development work:
https://github.com/djcoin/django-unaccent
I'm jealous as well, as my workplace isn't on PostgreSQL either (yet).

How to make my web service url case insensitive?

I have generated a web service from an existing wsdl file using Axis2, and now my service is reachable by a url
http://something/Service?wsdl
The problem is, there are some applications which call this url, adding an upper case word "WSDL" at the end of url (please don't ask why..), so they are calling it as,
http://something/Service?WSDL
And they can't access it at that url.
Is it possible to solve this problem? Maybe setting some parameter or making this url case insensitive someway?
I've taken a quick look at the Axis2 code and it seems the ?wsdl extension compare is case sensitive. This thing sometimes happen.
You could have a look at the code yourself and see if there is some switch somewhere to make this case insensitive (in case I missed something when looking at the code).
What you could do is have a filter in your application that looks at the query string and if it finds ?WSDL in there, in any case whatsoever, to do a redirect to the same URL but with a lower case ?wsdl. This of course assumes that the clients that try to access the WSDL can follow redirects.
The problem is, there are some applications which call this url, adding an upper case word "WSDL" at the end of url (please don't ask why..)
Sorry, but why? The most simple way is to tell clients to use a lower case parameter instead of an upper case one. If they can do a call with ?WSDL why is it so hard to do one with ?wsdl?

Case Insensitive search in jquery-bootgrid

Hi I have implemeted jquery-bootgrid. However, searching is based on case. My requirement is that searching should be done irrespective of case used i.e If am searching for "Australia" and the user types "australia" or "Australia" result should be same.
I looked into the documentation and the search setting only have "dealy" or "charatcers" option. So how should i implement case insensitive search?
The option to switch the behaviour is named caseSensitive and documented under General Settings. I will move this option in the next major release to searchSettings for the sake of consistency.
Example:
$("#grid").bootgrid({
caseSensitive: false
});

Using django-haystack, how do I perform a search with only partial terms?

I've got a Haystack/xapian search index for django.contrib.auth.models.User. The template is simply
{{object.get_full_name}}
as I intend for a user to type in a name and be able to search for it.
My issue is this: if I search, say, Sri (my full first name) I come up with a result for the user object pertaining to my name. However, if I search Sri Ragh - that is, my full name, and part of my last name, I get no results.
How can I set Haystack up so that I can get the appropriate results for partial queries?
(I essentially want it to search *Sri Ragh*, but I don't know if wildcards would actually do the trick, or how to implement them).
This is my search query:
results = SearchQuerySet().filter(content='Sri Ragh')
I use to have a similar problem, as workaround or maybe a Fix you can change the query lookup
results = SearchQuerySet().filter(content__startswith='Sri Ragh')
The issue is that django-haystack doesn't implement all lingos from search engines. Of course you can do this.
results = SearchQuerySet().raw_search('READ THE SEARCH ENGINE QUERY SYNTAX FOR GET WILDCARD LOOKUPS')
As Django-haystack says, this is not portable.
You can use icontains or startswith.
Be careful with this one, if a query is for example 'r', this will bring you all 'Model' entities that have a 'r' in its content.
Model.objects.filter(content__icontains=query)
Model.objects.filter(content__startswith=query)
Look at the documentation