Global Search Feature

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
joselv
Posts: 98
Joined: Sun Mar 02, 2008 11:19 pm
Location: Dallas, Texas

Global Search Feature

Post by joselv »

Ok, I'm racking my brains on this. Has anyone tried this?

I want to have a single search bar at the top of my application (in the header bar) that allows the user to search globally across most of the application objects.

I want the user to use that search bar to find anything from contacts to documents. It is a simple feature to the user but wow, not so easy to execute for my limited skills on AIM.

Has anyone tried this? I've considered BO groups and some type of tagging system (another feature I would LOVE to figure out) but no luck.
Jose
RocketRod
Posts: 907
Joined: Wed Aug 06, 2008 4:22 am
Location: Melbourne

Re: Global Search Feature

Post by RocketRod »

Actually it's quite straight forward. Add all required BO's to one Group. The key is that each BO to be used within the Group must have an attribute called the same name e.g. SearchText. Set up a rule on each BO to set this attribute to whatever you like. For example on the contact BO it may be the Contact's Name. On a customer BO it may be the customer's name and address appended together. I also placed another attribute on each BO that distinguished the BO type called SearchType. So on the contact BO it might be initialized to CONT and on the customer BO to CUST. This way in the query you can show on each row if its say a picture, a document, a contact, a customer etc. If you don't want to show the SearchType as a column give each a unique icon and show that. You can even put in rules on the query to show each type as a different colour. It's the power of groups!

Cheers Rod
RLJB
Posts: 914
Joined: Tue Jan 05, 2010 10:16 am
Location: Sydney, Australia

Re: Global Search Feature

Post by RLJB »

RocketRod has a very good solution and it WILL work but I have always stayed away from doing this because I don't want all my BOs in one group.

My reason: I don't want to be asked every time I do a config change if I want to do that change to the other 55 Business Objects in my bsv. Plus it just seems wrong to have to group all my BOs just to have a global search when they are really a group.

But I would like a Global Search feature, but I'd like it "baked in" to aware somehow. I've considered creating a BO which serves as a big index, you search that and then return it's related BO/instance. But users kind of expect a bit more than that these days, they want text highlighting in the search results etc.

I have previously been exposed to http://lucene.apache.org/core/ which is amazing, I see it is in java too.
Rod. Aware 8.6 (latest build), Developer Edition, on OS Linux (Ubuntu) using GUI hosted on AWS EC2, MYSQL on AWS RDS
joselv
Posts: 98
Joined: Sun Mar 02, 2008 11:19 pm
Location: Dallas, Texas

Re: Global Search Feature

Post by joselv »

Rod, that is a great idea! That should work for what I want to do. Thanks for your input!

RLJB, excellent points and I agree that putting so many BOs in a group is not ideal (yes, I hate being asked about applying changes to all other group BOs) but I really want a global search. I hope the AIM folks can put on their list of updates a baked-in global search feature. :mrgreen: :mrgreen:
Jose
RocketRod
Posts: 907
Joined: Wed Aug 06, 2008 4:22 am
Location: Melbourne

Re: Global Search Feature

Post by RocketRod »

I agree with Rod re the annoyance of the question you get prompted for every time you change a member of a group. It would be great if this could be disabled.

Another option.

I haven't tried it but I can't see why you could not set up a SQL view which incorporated UNION statements. This way you could set up your search attribute for each BO addressing different combinations of attributes within that BO.

Select BO1. name + BO1.Address as SearchField from BO1

UNION ALL

Select BO2.Contact as SearchField From BO2

etc

Then attached that view as a BO. If I get a chance I might play with it.

Cheers Rod
joselv
Posts: 98
Joined: Sun Mar 02, 2008 11:19 pm
Location: Dallas, Texas

Re: Global Search Feature

Post by joselv »

Quick update,

I went with RocketRod's suggestion and it works great!

This feature is so important to me that I don't mind the annoyance of the BO group messages.

With this handy little feature, I can now allow my users to use a single text input in the header to search across the entire application for any object I setup. Documents, projects, people, etc.. The query shows the results and AIM is smart enough to know about the object and open the appropriate form to view/edit.

I'm short on time right now but I'll post later on the steps I took and what it looks like. Awesome little feature!

Thanks everyone for your input.
Jose
RocketRod
Posts: 907
Joined: Wed Aug 06, 2008 4:22 am
Location: Melbourne

Re: Global Search Feature

Post by RocketRod »

Great!

Tip: When working with groups remember you can use the TYPE function if the process is required to do different things for different BO's within the group.

Cheers Rod
joselv
Posts: 98
Joined: Sun Mar 02, 2008 11:19 pm
Location: Dallas, Texas

Re: Global Search Feature

Post by joselv »

Finally got a chance to make a quick video of this working.

I hope this helps anyone else looking to do the same thing.

Thanks again RocketRod!

https://youtu.be/S30bYaGbFDI
Jose
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: Global Search Feature

Post by BenHayat »

joselv wrote:Finally got a chance to make a quick video of this working.

I hope this helps anyone else looking to do the same thing.

Thanks again RocketRod!

https://youtu.be/S30bYaGbFDI
Nice work Jose;
Since the "Name" attribute is already common in all those objects, why did you create another attribute called "SearchText", where you could have done your query filyering on "Name" rather than "SearchText"?
Try changing your query to search against "Name" and see that works, if yes, then that would save you an extra rule and attribute.
Just a thought.
joselv
Posts: 98
Joined: Sun Mar 02, 2008 11:19 pm
Location: Dallas, Texas

Re: Global Search Feature

Post by joselv »

Ben,

I was rolling over laughing at myself - how did I miss that?? Excellent point!

I went back and realized that I have the 'SearchText' setup because I do some concatenation with other attributes.

For example, every oil and gas well what is called an API number (here in the U.S. it is the equivalent a a social security number) that uniquely identifies that well. So in my SearchText I want the full well name AND the API number for that well.

It gives me the flexibility to search among more than one attribute in the object without having to make sure it exists in all of the other objects.
Jose
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: Global Search Feature

Post by BenHayat »

joselv wrote:Ben,

I was rolling over laughing at myself - how did I miss that?? Excellent point!

I went back and realized that I have the 'SearchText' setup because I do some concatenation with other attributes.

For example, every oil and gas well what is called an API number (here in the U.S. it is the equivalent a a social security number) that uniquely identifies that well. So in my SearchText I want the full well name AND the API number for that well.

It gives me the flexibility to search among more than one attribute in the object without having to make sure it exists in all of the other objects.
Well, with your explanation of needing to concatenate other info, "Search Text" makes sense now... :)
Jaymer
Posts: 2454
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Global Search Feature

Post by Jaymer »

hi
that video doesn't pull up now.
can you re-post it?
thx
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply