?
Solved

SearchView  vs. DomainSearch - any equivalent for "contains"

Posted on 2001-06-05
6
Medium Priority
?
461 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
Technology Partners: 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 300 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

777 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