Searching In FogBugz: Syntax and the search axis - FogBugz Knowledge Exchange most recent 30 from http://fogbugz.stackexchange.com 2013-05-20T02:30:21Z http://fogbugz.stackexchange.com/feeds/question/4399 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://fogbugz.stackexchange.com/questions/4399/searching-in-fogbugz-syntax-and-the-search-axis Searching In FogBugz: Syntax and the search axis FogBugz FAQ 2010-09-07T18:10:00Z 2013-05-02T23:41:20Z <p>Can you tell us all of the advanced features of FogBugz search and list every search axis and give examples of the search syntax?</p> http://fogbugz.stackexchange.com/questions/4399/searching-in-fogbugz-syntax-and-the-search-axis/4400#4400 Answer by FogBugz FAQ for Searching In FogBugz: Syntax and the search axis FogBugz FAQ 2010-09-07T18:29:44Z 2013-04-24T15:55:38Z <p>FogBugz Search works pretty much as you expect: you type your search terms in the box, and click Search.</p> <p>You can go directly to any case number by typing just a number. If you're actually searching for a number within your case text, just put it in quotation marks (e.g., "456").</p> <p>Any search can be saved as a filter, either by clicking on the disk icon in the Search Tools box in the upper right corner of the results page, or from the Filters menu. </p> <p>FogBugz will initially return a maximum of 45 case results or 10 wiki or discussion group results, sorted by relevance, with a link to "List all" to see the rest of the results.</p> <p>FogBugz also supports advanced search queries.</p> <ul> <li><strong>apple peach</strong> searches for items containing both apple and peach</li> <li><strong>apple OR peach</strong> searches for items containing either apple or peach</li> <li><strong>"apple peach"</strong> searches for items containing the phrase apple peach</li> <li><strong>apple -peach</strong> searches for items containing apple but not containing peach</li> <li><strong>pear*</strong> Searches for items containing words that start with pear. Can take a long time.</li> </ul> <p>Note that FogBugz search uses stemming, not exact matches. For example: searching for <strong>hiking</strong> will find cases containing <strong>hike</strong>, <strong>hiking</strong> and <strong>hiker</strong>. If you see unexpected search results, take a look at <a href="http://fogbugz.stackexchange.com/questions/3323/searches-are-returning-unexpected-results-search-for-subjective-gets-me-subje" rel="nofollow">this post</a>.</p> <p>When your search phrase contains quotation marks, you can deal with them in two ways:</p> <ul> <li>Use single quotes around double quotes, e.g. <strong>openedby:'Joel "The Bossman" Spolsky'</strong></li> <li>Escape the quotation marks with backslashes, e.g. <strong>openedby:"Joel \"The Bossman\" Spolsky"</strong></li> </ul> <h2>Searching specific fields with axes</h2> <p>Use axis:query to search specific fields. <strong>title:pear</strong> will find everything with the word <strong>pear</strong> in the title. You can negate an axis as well: <strong>-title:pear</strong> will find everything without the word pear in the title.</p> <p>You can also combine axes with Boolean queries and parentheses. <strong>newfeature (assignedto:Tester1 OR assignedto:Tester2) (resolvedby:Developer1 OR resolvedby:Developer2)</strong> will return all cases that mention <strong>newfeature</strong> that have been resolved by either <strong>Developer1</strong> or <strong>Developer2</strong> that are currently assigned to <strong>Tester1</strong> or <strong>Tester2</strong>. </p> <p>Note that OR has a lower priority than the implied AND, so <strong>assignedto:Tester1 OR assignedto:Tester2 resolvedby:Developer1</strong> will return all cases assigned to Tester1 as well as cases that are both assigned to Tester2 and resolved by Developer1. To get the result of cases resolved by Developer1 that are assigned to Tester1 or Tester2, use parentheses: <strong>(assignedto:Tester1 OR assignedto:Tester2) resolvedby:Developer1</strong></p> <p>Combining <strong><em>action</em></strong>: and <strong><em>actionby</em></strong>: axes (e.g. <strong>edited/editedby</strong>, or <strong>opened/openedby</strong>) has a special behavior, where the FogBugz searcher links the two searches. For instance, in the case of <strong>editedby:me edited:today</strong>, FogBugz will return only cases that I edited today, rather than the strict intersection which would be the cases I edited at some point which were also edited by somebody (not necessarily me) today. If you want to search for a case edited by more than one person, please use the syntax of <strong>editedby:me alsoeditedby:michael</strong>.</p> <p>Use the <strong>type</strong> axis to specify what type of documents you wish to search. <strong>type:case</strong> will search for cases, <strong>type:wiki</strong> will search for wiki pages, and <strong>type:discuss</strong> will search for discussion topics. If you use a search axis such as <strong>edited</strong> that applies to all types of documents, FogBugz will return a summary of search results organized by document type.</p> <p>Axis search does a sub-string match on the query, so if you have two projects, "Widget Factory" and "Widget Distributor" and you search for <strong>project:Widget</strong>, you will get results for both projects. A notable exception is the <strong>title:</strong> axis, which uses stemming, just like search. While searching for <strong>Project:Roc</strong> will find cases in the <strong>Rocketship</strong> project (sub-string match), a search for <strong>Title:asdf</strong> will NOT find a case with the title <strong>asdfasdf</strong> because <strong>asdf</strong> is not a stem of <strong>asdfasdf</strong> (neither are real words or parts of words).</p> <p>To search for an exact match, use the field's "ix" (ID) by using <strong>:=</strong> instead of <strong>:</strong> as the operator. For example <strong>project:=1</strong> finds cases in Sample Project. The exception to this is the <strong>tag</strong> axis, which does an exact match, so <strong>tag:foo</strong> matches "foo" but not "foobar".</p> <p>Most axes also support * as a wildcard. See <a href="http://fogbugz.stackexchange.com/questions/3323/searches-are-returning-unexpected-results-search-for-subjective-gets-me-subje" rel="nofollow">this post</a> for caveats.</p> <h3>Dates</h3> <p>You can search dates (or date + times) and date ranges (use .. to indicate date ranges -- ... also works). When you have a decimal number in a range, include a leading zero, e.g. "0.5" instead of ".5" Here are some date search examples:</p> <ul> <li><strong>edited:"March 2007"</strong> everything modified during the month of March 2007</li> <li><strong>edited:"3/26/2007"</strong> everything modified on March 26, 2007</li> <li><strong>edited:"March 2007..June 2007"</strong> everything modified during the months of March through June in 2007</li> <li><strong>edited:"3-26-2007..6-8-2007"</strong> everything modified between March 26, 2007 and June 8, 2007, inclusive</li> <li><strong>edited:"5/6/2012 5:00pm..5/7/2012 9:00am"</strong> everything modified between May 5th at 5pm and 9am the next day</li> <li><strong>edited:"today"</strong> everything modified today</li> <li><strong>edited:"last Thursday"</strong> everything modified on the Thursday of the previous week</li> <li><strong>resolved:"last month"</strong> everything resolved in the previous calendar month</li> <li><strong>resolved:"this week"</strong> everything resolved between Sunday of the current week and today</li> <li><strong>resolved:"yesterday"</strong> everything resolved yesterday</li> <li><strong>due:"tomorrow"</strong> everything due tomorrow</li> <li><strong>due:"next week"</strong> everything due from next Sunday through the following Saturday</li> </ul> <p>Date ranges can also be open-ended to indicate anything before, or after a date or date and time. For examples:</p> <ul> <li><strong>opened:"1/14/2011.."</strong> everything opened January 14th 2011 and later</li> <li><strong>due:"..10/10/2012 4:30pm"</strong> everything due before October 10th 2012 at 4:30pm (including cases due in the past)</li> </ul> <p>As of FogBugz 7.1.11, you can also search for dates and times relative to the current time, too, using a special syntax of + or - a certain number of minutes, hours, days, or weeks, (m, h, d, w, respectively). This is shorthand for a date and time relative to the current exact time (which can be expressed as now). If the current date and time is 12/25/2009 8am, then "-3w" will translate to 12/4/2009 8am.</p> <ul> <li><strong>opened:"-3w..-1w"</strong> everything opened between 1 and 3 weeks ago</li> <li><strong>closed:"-30m..now"</strong> everything closed in the last 30 minutes</li> <li><strong>viewed:"-1d.."</strong> everything I've looked at in the last 24 hours</li> <li><strong>due:"..+3h"</strong> everything due in the next three hours</li> <li><strong>opened:"3/21/2007..-5d"</strong> everything opened between 3/21/2007 and 5 days ago</li> <li><strong>due:"now..today"</strong> everything due between now and the end of the day</li> </ul> <p>Note that relative search times are not rounded. For instance, <strong>opened:"yesterday.."</strong> will show you everything opened from the beginning of yesterday up to the current moment, whereas <strong>opened:"-1d.."</strong> will show you everything opened in the last 24 hours, exactly.</p> <p>+'s are implied, so <strong>due:"now..+5m"</strong> is equivalent to <strong>due:"now..5m"</strong>.</p> <p>..'s are <strong>not implied</strong>, so while <strong>edited:"-20m.."</strong> means "edited within the last 20 minutes", <strong>edited:"-20m"</strong> means "edited exactly 20 minutes ago".</p> <h2>Axes for searching cases</h2> <p>In general, an axis can be formed from the title of any column in the grid view by removing the spaces e.g. the "Assigned To" column becomes the "assignedto:" axis. To find out what possible values are available for a given axis, add the corresponding column to the grid view of a filter and see what values are listed.</p> <ul> <li><strong>AlsoEditedBy</strong> cases edited by the specified user, to be used in combination with EditedBy</li> <li><strong>Area</strong> cases in the specified area</li> <li><strong>AssignedTo</strong> cases assigned to the specified user</li> <li><strong>Attachment</strong> cases with an attachment with the specified name</li> <li><strong>Category</strong> cases with the specified category</li> <li><strong>Closed</strong> (date) cases closed on the date specified</li> <li><strong>ClosedBy</strong> cases last closed by the specified user</li> <li><strong>CommunityUser</strong> cases that were submitted by the specified community user</li> <li><strong>Computer</strong> cases containing specific text in the second custom field. Note that this field may have been renamed in your installation.</li> <li><strong>Correspondent</strong> cases with the specified email correspondent</li> <li><strong>CreatedBy</strong> this is a synonym for the <strong>OpenedBy</strong> axis: cases <em>last</em> opened or reopened by the specified user. Note that this is <em>not</em> necessarily the user who <em>first</em> opened the case (<a href="http://fogbugz.stackexchange.com/questions/11270/the-opened-by-user-is-not-the-user-who-originally-opened-the-case" rel="nofollow">details</a>)</li> <li><strong>Department</strong> cases belonging to the specified department</li> <li><strong>Due</strong> (date) cases due on the date specified</li> <li><strong>Edited</strong> (date) cases modified on the date specified</li> <li><strong>EditedBy</strong> cases with a bug event generated by the specified user</li> <li><strong>ElapsedTime</strong> cases with the specified (range of) elapsed time</li> <li><strong>EstimateCurrent</strong> cases with the specified (range of) current estimate e.g. EstimateCurrent:"..2h" would show all cases with less than 2 hours of estimated work remaining.</li> <li><strong>EstimateOriginal</strong> cases with the specified (range of) original estimate</li> <li><strong>From</strong> cases with emails from the specified email address</li> <li><strong>ixBug</strong> case matching the case number specified. Can be used with <strong>OR</strong> to search for multiple cases, e.g. <code>ixBug:"123" OR ixBug:"55"</code> will return cases 123 and 55.</li> <li><strong>LastEdited</strong> (date) cases that were modified on the date specified and have not been modified since then</li> <li><strong>LastEditedBy</strong> cases last edited by the specified user</li> <li><strong>LastViewed</strong> (date) cases that you last viewed on the date specified</li> <li><strong>Milestone</strong> cases assigned to the specified milestone</li> <li><strong>Occurrences</strong> Number of occurrences for a BugzScout case</li> <li><strong>Opened</strong> (date) cases opened on the date specified</li> <li><strong>OpenedBy</strong> cases last opened or reopened by the specified user. Note that this is <em>not</em> necessarily the user who <em>first</em> opened the case (<a href="http://fogbugz.stackexchange.com/questions/11270/the-opened-by-user-is-not-the-user-who-originally-opened-the-case" rel="nofollow">details</a>)</li> <li><strong>OrderBy</strong> This takes another axis as its argument and sorts the search results by that axis e.g. "OrderBy:Milestone OrderBy:Priority" will sort the search results first by Milestone, and then by Priority. You can also reverse the order by using a negative sign and wrapping the whole term in quotes: OrderBy:"-Milestone" OrderBy:Priority</li> <li><strong>Outline</strong> returns cases in the same subcase hierarchy as the specfied case.</li> <li><strong>Parent</strong> returns all subcases of the specified case.</li> <li><strong>Root</strong> all cases in the hierarchy underneath the specified case.</li> <li><strong>Priority</strong> cases with the specified priority</li> <li><strong>Project</strong> cases in the specified project</li> <li><strong>ProjectGroup</strong> cases in the specified Project Group (from the <a href="http://www.fogcreek.com/fogbugz/Plugins/plugin.aspx?ixPlugin=61" rel="nofollow">ProjectGroups Plugin</a>)</li> <li><strong>RelatedTo</strong> cases that are linked to the specified case</li> <li><strong>Release</strong> same as milestone</li> <li><strong>ReleaseNotes</strong> search for "ReleaseNotes:*" to see all cases with release notes</li> <li><strong>RemainingTime</strong> cases with the specified (range of) original estimate</li> <li><strong>Resolved</strong> (date) cases resolved on the date specified</li> <li><strong>ResolvedBy</strong> cases last resolved by the specified user</li> <li><strong>Show</strong> cases with the specified attribute (<em>Read</em>, <em>Unread</em>, <em>Subscribed</em> or <em>Spam</em>)</li> <li><strong>StarredBy</strong> <em>starredby:me</em> shows cases you have starred.</li> <li><strong>Status</strong> cases with the specified status</li> <li><strong>Tag</strong> cases with the specified tag</li> <li><strong>Title</strong> cases containing the specified words in the title</li> <li><strong>To</strong> cases with email to the specified email address</li> <li><strong>Version</strong> cases containing specific text in the first custom field. Note that this field may have been renamed in your installation.</li> <li><strong>ViewedBy</strong> <em>viewedby:me</em> shows cases you have previously viewed.</li> </ul> <h2>Axes for searching wiki pages</h2> <ul> <li><strong>Edited</strong> (date) wiki pages that were modified on the date specified</li> <li><strong>EditedBy</strong> wiki pages edited by the specified user</li> <li><strong>LastEdited</strong> (date) wiki pages that were modified on the date specified and have not been modified since then</li> <li><strong>LastEditedBy</strong> wiki pages last edited by the specified user</li> <li><strong>LastViewed</strong> (date) wiki pages that you last viewed on the date specified</li> <li><strong>Show</strong> wiki pages with the specified attribute (<em>Read</em>, <em>Unread</em> or <em>Subscribed</em>)</li> <li><strong>StarredBy</strong> <em>starredby:me</em> shows wiki pages you have starred.</li> <li><strong>Title</strong> Finds wiki pages containing the specified words in the title</li> <li><strong>ViewedBy</strong> <em>viewedby:me</em> shows wiki pages you have previously viewed.</li> <li><strong>Wiki</strong> wiki pages in the specified wiki</li> </ul> <h2>Axes for searching discussion topics</h2> <ul> <li><strong>CreatedBy</strong> topics created by the specified user</li> <li><strong>DiscussionGroup</strong> topics in the specified discussion group</li> <li><strong>Edited</strong> (date) topics that were modified on the date specified</li> <li><strong>EditedBy</strong> topics edited by the specified user</li> <li><strong>LastEdited</strong> (date) topics modified on the date specified and which have not been modified since then</li> <li><strong>LastEditedBy</strong> topics last edited by the specified user</li> <li><strong>LastViewed</strong> (date) topics that you last viewed on the date specified</li> <li><strong>Opened</strong> (date) topics opened on the date specified</li> <li><strong>Show</strong> topics with the specified attribute (<em>Read</em> or <em>Unread</em>)</li> <li><strong>StarredBy</strong> <em>starredby:me</em> shows topics you have starred.</li> <li><strong>Title</strong> topics containing the specified words in the title</li> <li><strong>Type</strong> type:case for cases, type:wiki for wiki pages, type:discuss for discussion topics</li> <li><strong>ViewedBy</strong> <em>viewedby:me</em> shows topics you have previously viewed.</li> </ul> <h2>About the FogBugz Search Engine</h2> <p>For performance and search quality, FogBugz has its own full-text search engine, based on Apache's <a href="http://incubator.apache.org/lucene.net/" rel="nofollow">Lucene.NET</a>.</p> <p>FogBugz builds its index in the background, and updates it frequently. However:</p> <ul> <li>Things entered into FogBugz very recently may not yet be indexed.</li> <li>Building the index for the first time can take hours or days, depending on the size of your FogBugz database.</li> </ul> <p>Go to <strong>Admin | Site</strong> and click on the <strong>Search</strong> tab to see the status of the index, and what percentage of your database is indexed.</p> <p>On rare occasions when the index is not available or missing large amounts of data, FogBugz starts re-indexing with the most recently updated cases first, in an attempt to get the most relevant cases into the index as soon as possible.</p> http://fogbugz.stackexchange.com/questions/4399/searching-in-fogbugz-syntax-and-the-search-axis/9050#9050 Answer by Yaron Kretchmer for Searching In FogBugz: Syntax and the search axis Yaron Kretchmer 2011-08-22T03:29:19Z 2011-08-22T03:29:19Z <p>Is there a limit to the length of the query, or to the length of the resulting URI? I keep getting "URL too long" errors.</p> <p>Thanks Yaron</p> http://fogbugz.stackexchange.com/questions/4399/searching-in-fogbugz-syntax-and-the-search-axis/10243#10243 Answer by Angela for Searching In FogBugz: Syntax and the search axis Angela 2012-04-05T15:02:16Z 2012-04-05T15:02:16Z <p>Department is no longer a search axis; "The requested search axis 'department' is not recognized." </p> <p>What can be used for searching by "Groups" (not project groups, but user groups)?</p> <p>Thanks! ~Angela</p> <p>P.S. The projectgroup axis is missing from this page as well.</p> http://fogbugz.stackexchange.com/questions/4399/searching-in-fogbugz-syntax-and-the-search-axis/10888#10888 Answer by Tommaso Ercole for Searching In FogBugz: Syntax and the search axis Tommaso Ercole 2012-10-22T08:52:34Z 2012-10-22T08:52:34Z <p>Is there an axis to look for the cases currently working on?</p> http://fogbugz.stackexchange.com/questions/4399/searching-in-fogbugz-syntax-and-the-search-axis/11291#11291 Answer by Kevin Binswanger for Searching In FogBugz: Syntax and the search axis Kevin Binswanger 2013-05-02T23:41:20Z 2013-05-02T23:41:20Z <p>Is there an axis to match the Open or Closed search filter?</p>