Solved

searching data

Posted on 2004-09-13
11
633 Views
Last Modified: 2013-12-18
hi experts,

I have  a search engine built on "$$Viewtemplate for jobposting" and "$$Searchtemplate for jobposting" forms
which users can use to search for jobs posted in the "jobposting" view ( through the jobposting form). Users can then click on the search result and apply for the job.

There is a "create profile" form which users can use to fill their profile
information like firstname, lastname, etc.
 
Is there any way i could build a search engine to search for usernames (in the create profile form) who have applied for jobs posted in the "job posting" view.
For example, if i type
IBM, it should display all the "firstnames"( from the create profile form) who have applied for IBM.


I would greatly appreciate any help.

Thanks,
J
0
Comment
Question by:jaggernat
  • 3
  • 3
  • 2
  • +2
11 Comments
 
LVL 15

Expert Comment

by:Bozzie4
Comment Utility
Why don't you just create a view sorted by username ?

Anyway, you can search on fields if you have the fulltext index enabled (I suppose you already have that).  2 options, really : use url syntax or put the logic in an agent.

This is an example :

Put this somewhere on your form
full text search
<input type=text name=Query value=""><a href="javascript:doSearch(document.forms[0].Root.value,document.forms[0].Query.value);">Search</a>

And add the Query2, Query3 etc. fields in the same way.

Put this in the JS Header

function doSearch(theRoot,theQuery){
//alert( theRoot +" " +theQuery );
if (theQuery == "" ) {
      alert( 'Please enter at least 1 criterium for the search');
}else{
document.location.href="/"+theRoot+"?Searchview&query="+theQuery+"*";
return true;
}
}
function buildFieldSearch(aRoot) {
var aQuery = "";

if (document.forms[0].Query3.value == "") {
 // nothing
}else{
      if (aQuery == "" ) {
      aQuery = '[LastName]=' + document.forms[0].Query3.value;
      }else{
      aQuery = aQuery+'* AND [LastName]=' + document.forms[0].Query3.value;
      }
}

if (document.forms[0].Query4.value == "") {
 // nothing
}else{
      if (aQuery == "" ) {
      aQuery = '[FirstName]=' + document.forms[0].Query4.value;
      }else{
      aQuery = aQuery+'* AND [FirstName]=' + document.forms[0].Query4.value;
      }
}
if (document.forms[0].Query5.value == "") {
 // nothing
}else{
      if (aQuery == "" ) {
      aQuery = '[EmployeeID]=*' + document.forms[0].Query5.value;
      }else{
      aQuery = aQuery+'* AND [EmployeeID]=*' + document.forms[0].Query5.value;
      }
}

return doSearch(aRoot,aQuery);
}

And this in the onsubmit:

doSearch(document.forms[0].Root.value,document.forms[0].Query.value);
return false;

cheers,

Tom
0
 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
Hi jaggernat,

When the user applies, I assume a new "application" document is created, which includes the user name and the job information.  You shoudl be searching those documents.  It really has nothing to do with the profile or job listing forms, since theprofile does not contain job info (unless you make that happen), and the job listing contains no applicant data (which probably would not make sense to make happen).

So, just make sure the application document has fields for name and job # and job title and job description, etc., and you can easily search against those fields.  Search syntax is [FieldName]=Value.

Cheers!
0
 
LVL 10

Author Comment

by:jaggernat
Comment Utility
hi,

thanks for the responces. Qwaletee, the problem is that the application document created does not have the username information. It just has the job information, job title , etc. The user information is stored in a different form.

How do i bring the username information in the application document?

thanks,
J
0
 
LVL 10

Author Comment

by:jaggernat
Comment Utility
hi,

thanks for the responces. Qwaletee, the problem is that the application document created does not have the username information. It just has the job information, job title , etc. The user information is stored in a different form.

How do i bring the username information in the application document?

thanks,
J
0
 
LVL 14

Expert Comment

by:p_partha
Comment Utility
IN the create profile form, have a hidden field which will store for what 'Jobs' the user applied. After that you can create a view with this form ,and sort it with the username /job

Hope this helps

Partha
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
That doesn't make any sense to me.  If the user applies, but no user info is contained in the application, HOW DOES THE RECRUITER KNOW WHO APPLIED?

There's something missing here.

Now, if you included only a user ID or key of some sort, then I can understand it.  That will, however, make it harder to do the searches.  I suggest denormalizing the application, so it actually does copy in the user info.  If not, write an agent that searches the applications for the specific job, retrieves all the user keys, and then displays a list of profile links, with the associated profile name.
0
 
LVL 3

Expert Comment

by:Andrea Ercolino
Comment Utility
Magic not allowed, you need to put somewhere the relationship between the applicant name and the job posting.

Then a "search engine" is just a matter of having a button linked to the following javascript function:

<code>
function execSearch() {
  var f = document.forms[0];
  var query = buildQuery(); // shape you query here, and return "" if someting goes wrong
  if( query != "" ) {
    var queryHref = f.BaseURL.value + f.SearchDefaults.value + "&Query=" + escape( query );
    location.href = queryHref;
  }
}
</code>
0
 
LVL 10

Author Comment

by:jaggernat
Comment Utility
In the application document there is a submit button (before the user applies for the job). Once the user clicks on the submit button, it shoots an email to the recruiter. Thats how the recruiter knows who has applied.. Okay,
In the application document I can include a field and store the username in that application document. But the problem is how do i create a search that retrieves the username and job info.

thanks,
J
0
 
LVL 3

Expert Comment

by:Andrea Ercolino
Comment Utility
Your problem follows the "user takes item" design pattern. So you need a document to store and retrieve User data (User form), a document to store and retrieve Item data (JobPosting Form), and a document to store and retrieve "who took what" data, i.e. the Relationship data (Application form).

You need to show to the user a view on the current JobPosting documents with their descriptions and expiration date and whatever else. When a user clicks on a job posting link, she will see the correspondent job posting document showing more data about the offering. Noe, if she decides to apply for that job, you need to collect her data to create a User document and an Application document (1). In the latter you should put at least the UserName (if never two users share the same username), the JobTitle (if never two jobs share the same title), and the time at which the relationship was created. It happens that Notes likes redundant data, so I think you'll put something else inside the application document, for example just to show nicely in a view.

Finally you'll create a view Applications where you <<SELECT Form="Application">>, with the first column "Job Title" sorted ascending and showing the field "JobTitle", the second column "User Name" unsorted and showing the field "UserName", and the third column sorted descending and showing the field "Date" (2), and all the other columns you want.

Now, put a textbox labeled "JobQuery" to get the job title to search and a button labeled "Search" and linked to the following javascript function and start testing.

function execSearch() {
  var f = document.forms[0];
  var query = f.JobQuery.value;
  if( query != "" ) {
    var queryHref = "http://www.yourdomain.com"
    + "/path/to/database.nsf/"
    + "Aplications?SearchView&Query=" + escape( query ); // (3)
    location.href = queryHref;
  }
}


---
(1) - alternatively, you can put application data along with user data in the user document, but it's is not a flexible approach
(2) - alternatively, choose a different sorting for the 2nd and 3rd columns
(3) - remember to put your database URL properly formatted
0
 
LVL 3

Accepted Solution

by:
Andrea Ercolino earned 500 total points
Comment Utility
Three things to remember:

(a) Search syntax is [FieldName]=Value (as qwaletee already said). So, if you want to search for JobTile, add this line
  <<query = "[JobTitle]=" + query;>>
as the first line inside the if block.

(b) I's necessary that the database be indexed. On the contrary it's not strictly necessary to have the first column of the Applications view sorted, but is helps you. (I think)

(c) Don't be fooled by the "Keep current order" option (SearchOrder=4) for search results. It has a Page scope, as opposed to a View scope. It means that you'll see first the most relevant documents (SearchOption=1, default), resorted inside the current page as they appeared in the searched view. So if you have a multipage results set, it's quite sure that documents you'd think they appear at the end of the results pages, on the contrary they appear at the beginning, and documents you'd think they appear at the beginning, on the contrary they appear at the end. This is because Notes wants to show you first the most-relevant-to-Notes documents, rather than the most relevant to you.

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

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

10 Experts available now in Live!

Get 1:1 Help Now