[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:

Searching and Search Results- Need workaround for Web.

Dear Experts,
Server and Client Version: ND 6.5
I have a requirement to do a search on a particular notes database from the browser. I am not allowed to use notes agent to dynamically build an html page due to performance issue. Neither I have the option of embedding the view in a $$SearchTemplate, since the search parameter is going to exceed 256k URL limit.

Could someone suggest an idea?


Thanks,
maddy.
0
madheeswar
Asked:
madheeswar
  • 5
  • 5
  • 5
  • +2
4 Solutions
 
p_parthaCommented:
Maddy
Normally 256 character in a URL is way too much, If there are really so many fields that is hitting on the URL length restriction then you can do a post operation . What i mean is something like this:

close your form tag

</form>
<form name="maddy" action = "http://yourservername/yourdatabasename/youragentname?openagent">

<all your normal fields>

</form>

when clicked on search you have to either say document.forms[1].submit() or document.forms["maddy"].submit().

in your agent

Just write this code:

dim session as new notessession
dim doc as notesdocument
set doc  = session.documentcontext
print doc.request_content(0)


it will print all the fieldnames and values

Do whatever you want with that :)

partha
0
 
madheeswarAuthor Commented:
Thanks Partha.

For 256K limit, I thought of creating a Computed Text field and get all the parameters (search queries) into the field and use this field in agent. (My search query will cross 256K, as the choices in advanced search are dynamic and the choices are very large.)

Queries:
Since this agent is called by many people at the same time, how to reduce the performance impact on Domino server?
And utilize the search results for next search which are displayed in client(IE)?

I thought to use of XML. But I am not master in that. So, I need pointers or code to start my work. How about using Servlets?

Waiting for answers.
thanks,
maddy.



0
 
Sjef BosmanGroupware ConsultantCommented:
Hi Madheeswar,

You wanted me to respond to this question? Well here I am. You could have sent me an invitation by mail, see my profile ;)

You're in a tight spot here. I didn't respond because I don't have a swift solution. Your requirements seem somewhat too tight: it must be standard, and fast, and terribly short. These don't go very well together, it cannot be done without a lot of effort (like going to a C++ DLL that performs the query for you, whacks everything in HTML and posts the result somewhere).

By the way, where does that 256 limit come from? (You even wrote 256K, I assume that's a typo). There is some string limit when using JavaScript or so, but not a standard URL. They can be quite long, 4 K seems to be no problem. So did you try to get by with the $$SearchTemplate?
0
Independent Software Vendors: 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!

 
madheeswarAuthor Commented:
Thanks Sjef.
256K limit is for URL. So, I am in a tight position.

How about XML, Servlets?
0
 
p_parthaCommented:
Whether it's XML or servlet, you have to query the database to get the results. So i am not sure what performance u are going to gain. But if you use a servlet, it's loaded only once in the memory as opposed to agents. Servlet also would be a good choice , but the way i described can keep your client happy for sometime..

Partha
0
 
madheeswarAuthor Commented:
I am bothered about the agent.

When multiple persons trigger agent, this is going to effect the server performance. As there are lots of agents running.

My query is, can't we use the search result which is displayed at the first query for the next time for saving performance/load on server?

Is it possible to make all the Notes documents into XML and then search on them and display it when serached? Will it be easy? I am not pretty sure on how to get this workaround.
0
 
HemanthaKumarCommented:
That is the reason.. SOAP is getting popuar .. What it does is transmit data using xml with soap headers. The server should understand this piece of information and process

The only best way in your case is webquerysave agent... Fill out the data in a form and call the agent which will read these data and present the search results.. (and set saveoptions to 0 so this doc is not saved to the db)

~Hemanth
0
 
Sjef BosmanGroupware ConsultantCommented:
256K?! You'll hit that one?? Assuming that half the size of that URL will be fieldnames or whatever, then the other half must be user data. Nobody in any normal state of mind will type in 128K characters when searching! And, if they would do so, there will never be two searches at the same time. I therefore think that you will never hit that limit. So build a standard $$Search form, and read the help on Customizing search forms (which you probably already did).

I'm afraid I won't be rewarded for this comment...

Sjef ;)
0
 
p_parthaCommented:
Maddy
there is a 1024 character length restriction in URL. what is this 256k limit you are talking abt. I don't get you.

Moreover the method i explained does a post so you are safe...

Partha
0
 
Sjef BosmanGroupware ConsultantCommented:
1024 character limit?? Why don't you look in the Server document of your server, Internet protocols, HTTP, bottom right-hand corner? It says:
    Maximum URL length:    4 kilobytes
and it can be changed, like most limits! By the way, the length of POST data can also be restricted, see the Internet Site document.

I mean it: read the Designer Help on "Customizing search forms":
>  The $$Search form builds and invokes a SearchView URL command to
>  perform the search, supplying arguments either as URL command
>  arguments or using posted field values.
0
 
p_parthaCommented:
am sorry bro, it's 2,048 (double of what i said )  characters for GET:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q208427

Partha
0
 
Sjef BosmanGroupware ConsultantCommented:
Hi Bro, thanks for tihe info. Is there also a limit in IE6?

Indeed I used some server-to-server URL-requests, we could work with about 4 K easily. We never looked into the limiting factors, though, it could have been the Domino-server sending the URL or the receiving end (unknown server). As you said, the POST isn't limited when you use a form.
0
 
p_parthaCommented:
am not sure abt IE6, but never really had a situation of that many characters in URL...

Partha
0
 
madheeswarAuthor Commented:
Thanks guys for answering.

Hemanth,
May I know how to implement XML and SOAP.
How to start working on this logic, etc.,

thank you.

maddy.
0
 
Sjef BosmanGroupware ConsultantCommented:
By the way, Madheeswar: congrats, you're Guru now!
0
 
HemanthaKumarCommented:
For that you have to install websphere.. or wait for Domino 7..

The server has to support this protocol...

For time-being the soln.. that I see is post data and let WQS agent handle it..you will be wasting time to explore options here.. as there are really no options !
0
 
madheeswarAuthor Commented:
Thanks Sjef.

Hemanth,
Ok. I will proceed with the old method. But, if you get any ideas/workarounds, then let me know.

Thanks,
maddy.
0
 
RanjeetRainCommented:
Hi guys!

Sorry about late entry.

I did tell some time back that URL size limitation is a Webbrowser feature. I remember a similar question discussion took place not long ago. For IE6 the upper limit is is 2K chars. Maddy must have been misplacing things.

Performance I dunno about, but 2K is enough for normal searches. And for more, there's POST. Normally, for performance I'd change the view refresh option. I'd like to set it to manual. But then again, that depends on whether you can afford to do so. If you use Search/FTSearch, you are out of luck. If you search a view, that can help.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 5
  • 5
  • 5
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now