1

2

I'm trying to find the correct search syntax to return me cases matching specific case numbers as well cases matching a specific search term. For example, I want to find case 7, case 9, and all cases matching "apple". My observations are:

bug:7 OR bug:9 (Works OK, gives me cases 7 and 9)

apple (Works OK, gives me all cases matching apple)

bug:7 OR bug:9 OR apple (Does not work, gives me only cases matching apple, and not cases 7 or 9)

bug:7 OR bug:9 OR project:fruit (Works OK, gives me cases 7 and 9 and all cases in fruit)

This seems inconsistent to me. I tried various other searches and it's hit-and-miss whether the OR will really work - seems to vary depending on what type of search terms you are using. Is there any way to do what I need?

P.S. The reason I need this is because I'm using the XML API to query certain cases, and unfortunately it takes a while for newly created cases to be indexed so that they can be searched for. So I'm trying to find a way to do a single query that matches my required search terms PLUS a number of case IDs for cases that I know were recently created. More on the problem with searching for newly created cases:

http://fogbugz.stackexchange.com/questions/757/fogbugz-api-to-create-a-case-and-then-search-for-that-case-fails

flag

1 Answer

1

Hmm, looks like a bug in full-text search. I've duplicated it on my end.

There's a known issue relating to OR's not functioning properly, however I didn't realize it was this befuddling. I'll bump the priority.

What's happening is that combining a full-text search ("apple") with a non-full-text search ("bug:7") causes an improper union of the result sets.

As a workaround, stay entirely in one domain or another: Tag all of your desired cases with a unique string, like 'quirklmni', then search for:

quirklmni or apple

It'll all be performed in full-text, so you're good.

Likewise, if you can get it all to non-full-text (avoid the 'apple' search), you'll also be ok.

link|flag
Unfortunately I can't do an all-full-text search, because I may need to do this query soon after creating or updating a case, so the search indexing may not have been completed yet. I also really need the "apple" part of the search, so can't do an all-non-full-text search. Guess I'll just have to do 2 separate queries :( – danielm Jan 29 2010 at 23:22

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.