Solved

SearchView  vs. DomainSearch - any equivalent for "contains"

Posted on 2001-06-05
6
458 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6157000
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
ID: 6157247
Listening...
0
 

Author Comment

by:noloco
ID: 6158839
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:noloco
ID: 6158897
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
ID: 6161818
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
ID: 6162899
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA Lotus notes 2 203
IBM SAN DS 3512 Controllers Networking issues 11 68
Lotus Domino server 9 7 89
Save conflict messages on existing documents 15 88
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

726 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