What is query builder

What is query builder

Anonymous
Not applicable
1,396 Views
6 Replies
Message 1 of 7

What is query builder

Anonymous
Not applicable

 

 

<snip> long rant about not being able to find query builder; it's NOT part of the search window, it's a dropdown next to the search on the vault interface window</snip>

 

What I'd like to accomplish is to search for my name, in "field1" OR "field2" OR "field3" AND state is NOT "approved"

 

it's a simple query, but it seems very hard to make vault go looking in a way that I can save as a folder.

 

Is there a way to make a saved search from the query builder?

0 Likes
Accepted solutions (1)
1,397 Views
6 Replies
Replies (6)
Message 2 of 7

cbenner
Mentor
Mentor

@Anonymous

 

Yes.

 

Create your search, test it out and make sure it's what you want.  Then got to File\Save Search or Save Search As.  One of the options is to save is as a folder, which will put it under you saved search folders for later use.

0 Likes
Message 3 of 7

Anonymous
Not applicable

Ok, I see how to save it, thanks for that, but how do I search for 3 fields using OR?

 

(Field1="myname" OR field2= "myname" OR field3 = "myname") AND (state=NOT "approved)

 

the multiple properties search doesn't' really work, because it shows EVERY file I've ever authored.

 

I get that I can use OR inside a field, but I need to search for any of 3 and only 3 fields having the desired string.

0 Likes
Message 4 of 7

Madhan_T
Community Manager
Community Manager
Accepted solution

Hi,

 

Currently, the query builder uses "AND". However, you may use the following method to filter further using OR.

 

ChangeANDtoOr.png

 

Regards,

Madhan

 

If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!

 

 




Madhanagopal Thiruvenkatachalam
Principal Engineer
Engineering Escalation Team
Autodesk, Inc.

Message 5 of 7

Anonymous
Not applicable

I accepted your solution, because it answers the question.

 

I would say to Autodesk though, this is not a *GOOD* solution - it's awkward and needs to be set up uniquely every time.  We need to be able to save searches with more complex queries.

 

The vault is built on SQL, right?  Let us build SQL queries, please.

0 Likes
Message 6 of 7

Madhan_T
Community Manager
Community Manager

Thank you for accepting it as a solution.

 

 

We use Lucene interface that tokenizes the value and keeps the corresponding records of Indexed Id from SQL Table. Whenever the user requests to find a string, the query indeed constructs (SearchRule is 'Must' instead of 'May') and sends to Lucene and it retrieves the data from SQL. In this way, it is much faster for all the users.

 

The conditions are built like the following.

<conditions>
<SrchCond PropDefId="12" SrchOper="9" SrchTxt="40000" PropTyp="SingleProperty" SrchRule="Must" />
<SrchCond PropDefId="9" SrchOper="1" SrchTxt="Second" PropTyp="SingleProperty" SrchRule="Must" />
<SrchCond PropDefId="18" SrchOper="10" SrchTxt="1" PropTyp="SingleProperty" SrchRule="Must" />
</conditions>

 

 

I just wanted to clarify the reason for the queries being AND (Must) instead of OR (May) are

 

1. Performance 

 

2. Performance 

 

3. 1& 2

 

 

Yes. Believe me; If we use "OR" it is going to pull more data from SQL and other users have to wait until the results are returned.

 

Those were from the development perspective, I am open to your further questions to know more about the practical usage of OR in your workflow. Based on your feedback, I will bring it back to the core team to evaluate the requirements and consider it for future. You may also wish to log a request in Ideastation and get votes from peer users.

 

Regards,

Madhan




Madhanagopal Thiruvenkatachalam
Principal Engineer
Engineering Escalation Team
Autodesk, Inc.

0 Likes
Message 7 of 7

Anonymous
Not applicable

https://forums.autodesk.com/t5/vault-ideas/use-boolean-expressions-in-searches/idi-p/3551524


This idea has been accepted, and I think will solve it.

 

Definitely should default to "And".

 

Thank you for the explanation.  Performance is important - maybe if you switch to "OR" there should be a little red text that appears below the "OK" button that says "This is going to take a while, are you sure?"  Please don't make it a pop up window - we have too many of those already! 🙂

0 Likes