Solved

SearchView  vs. DomainSearch - any equivalent for "contains"

Posted on 2001-06-05
6
453 Views
Last Modified: 2013-12-18
Hi - I'm developing a web search in Domino(5.02) for a one-database application. I'd prefer not to do a DomainSearch as I'm only searching one database so instead I'm using the SearchView method. Domino Help tells me I cannot use the "field X contains Y" facility in a query if I'm not using a DomainSearch - so that rules that, very sadly, out for my Searchview method.

Does anyone know of an equivalent for this "contains" part of a query for Searchview?

It would be a shameful restriction otherwise. Or maybe I should be using DomainSearch - but I don't think that would  suit me for this single-databased application.


Much appreciation for your thoughts in advance, nOLOco.
0
Comment
Question by:noloco
  • 3
  • 2
6 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
I suppose you can do that.

Here is a tip that I found on the net, not sure of the source:
==================================
Create a form named "Search Form" with simple text fields that will be used to refer to the Notes fields of the documents in the
"Search View" below. Name these fields form_Field1 and form_Field2 which correspond to Notes fields named Field1 and
Field2. Add a field named "SaveOptions" with a default value of "0" (with the quotes) so the form is not saved when submitted.

Put a $$Return field that is computed for display at the very top of your search form with a formula of:

  tField1 := @Trim(form_Field1);
  tField2 := @Trim(form_Field2);
  a := @If (tField1 = ""; ""; "([Field1] = " + tField1 + ")");
  b := @If(tField2 = ""; ""; "([Field2] = " + tField2 + ")");
  SearchFields := @Implode(@Trim(a:b); " AND ");
  REM " *** Empty search will return everything ***";
  SearchString := @If(SearchFields = ""; "*"; SearchFields );
  db := @Subset(@DbName; -1);
  view := "Search View";
  REM "*** Replace spaces with '+'s ***";
  SearchView := @Implode(@Explode(view; " "); "+");
  @Return("[/" + db + "/" + SearchView + "?SearchView&Query=" + SearchString + "]")

To initiate a search, provide a link somewhere that with Action hotspot of

  @Command([Compose]; "Search Form");
==================================


Basically appending query string with [Field1] is the trick to search specific field.

~Hemanth
0
 
LVL 5

Expert Comment

by:snocross
Comment Utility
Listening...
0
 

Author Comment

by:noloco
Comment Utility
I don't believe that is a solution for my problem.
The code above will only search for a match of the ENTIRE contents of a field... i.e. if FIELD1 = "ABC ... WXYZ";
However I want to search a field for any possible substring therein...
For example:
FIELD1 = "Try to resolve this problem"

I want to be able to somehow search if FIELD1 CONTAINS "solve". (which it does in this example).

But my problem is I cannot add the 'CONTAINS' keyword to a search query if I'm using SearchViews, I could only use it if I was using DomainSearch (which I want to avoid).

Wouldn't you agree Hemanth?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:noloco
Comment Utility
It would appear the answer has been a lot more simple than I thought. If I use a wildcard as follows:

field FIELD1 = *solve

and put that in the query string - this seems to do the equivalent of a CONTAINS ... in other words this will return every record in the database where FIELD1 contains the text "solve"!!!
I've checked this on R5 and that's what happens.
Maybe it was a silly question for starters - but it seems peculiar to me that the product provides 2 seperate options (wildcards AND CONTAINS) where one of them can do both.
Sorry for the hassle everyone - thanks for your efforts though - as always much appreciated.

nOLOco (well... maybe a bit)
  -
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 100 total points
Comment Utility
Your only bet would be to write an agent to collect all the documents in the folder and open it.

0
 

Author Comment

by:noloco
Comment Utility
My last entry on this was the answer I needed so I'll just close this off.
Thanks for your assistance anyway Hemanth.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now