[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

SearchView  vs. DomainSearch - any equivalent for "contains"

Posted on 2001-06-05
6
Medium Priority
?
463 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

649 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