|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
You can try Swish-e (it's open-source software):
http://www.swish-e.org/ I haven't used it myself, but it looks very good. I'd like to hear if it works for you! |
|
||||
|
__________________
Dave Barnes +1.303.744.9024 http://www.marketingtactics.com sitting in my basement with my iMac |
|
||||
|
we use the Fluid Dynamics Search Engine. $45 on off fee for the licence. you can see it at work on all of our sites.
http://www.xav.com/scripts/search/ |
|
|||
|
I can second Pagetta's recommendation of Fluid Dynamics - it has been working brilliantly for us and can handle re-directs, PDFs and DOCs with a plug-in, as well as opening with search terms highlighted. Definitely recommended.
Take care
__________________
Alex TJ Corsi di inglese per aziende - Milano Servizi di Traduzione Professionale |
|
|||
|
great post's people!
after spending a hour or two trawling through the web, and searching different forums for some site search scripts, I find just what i need in a nice handy sticky (good spot vectorman211) dave
__________________
Research and Development Blog |
|
||||
|
I wrote this thread:
Google site operator and forum site search before I read this post. It is explained how to implement a simple site serach function in the XML book mentioned in my first post. The code follows with the book. If you structure your site very well, you can make a very efficient site search engine in my view. It is not so very difficult to modify the code to your own needs. That site search function will retrive content by:
It is a programming task to retrive content by n features (eg. elements and attributes). The method is there.
__________________
Mini Network:: Financial information at your fingertips Learn object oriented programming where it started Last edited by kgun; 08-23-2007 at 02:19 PM. |
|
||||
|
|
|
||||
|
I get asked about this all the time and finally came across ZoomSearch a few weeks ago. After trying it out, I've decided to include it in a new site I'm working on. The free solution is perfect for little sites that don't have big budgets but still want a simple search feature.
ZoomSearch is easy to set up and free for small sites up to 50 pages. The "Standard" version will index 100 pages for $49 US, the "Professional" solution is only $99 US and will search up to 100,000 pages. The unlimited "Enterprise" license is only $299 US. You run their software from your desktop and specify file types and locations. The tool indexes your site and compiles a few files. You then upload the files to your server and you're good to go. The search box, extended search and results pages are simple to integrate with your site too. WrenSoft Website Search Engine Software Enjoy. |
|
||||
|
But the important question is what the SE index and find. Does it scan every page in your site for:
"bug" " bug " for example? The code I mention above is so simple that there should be no problem to modify it to find whatever you are looking for in your documents, especially if you have structured your documents and files well. If you buy an engine, it scans documents based on another programmers chosen criteria. If you program it yourself, it scans on what you specify. Not least for large companies that make their own XML meta language this may be very important. It can be made very effecient choosing the correct tags and attributes. How many have used engines like freefind, yahoo, google etc. sitesearch on their sites and searched for words you know are in your documents without finding them? The reason is that the engine does not scan the complete document as a string and match the word(s) you specify. There is no theoretic limit on the number of documents that can be scanned. The engine goes in a loop using XMLReader or another parser, loads one and one file into an object /variable, whose tags and attributs are scanned for the chosen criteria. Here is the most important and difficult Code:
$handle = opendir($fileDir);
$items = array();
while (($file = readdir($handle)) !== FALSE) {
if (is_dir($fileDir . $file)) continue;
if (!eregi("^(news|article|webcopy).*\.xml$", $file)) continue;
$xmlItem = simplexml_load_file($fileDir . $file);
if ((stripos($xmlItem->keywords, $term) !== FALSE or
stripos($xmlItem->headline, $term) !== FALSE or
stripos($xmlItem->description, $term) !== FALSE) and
(string)$xmlItem->status == 'live') {
$item = array();
$item['id'] = (string)$xmlItem['id'];
$item['headline'] = (string)$xmlItem->headline;
$items[] = $item;
} //The if test ends here.
} // The while loop ends here.
If you looked up the two related posts at the W3 Schools forum, you may have noted that my signature there is: $MyProfile = simplexml_load_file(myprofile.xml); echo $MyProfile->name; :: Kjell Gunnar Bleivik echo $MyProfile->xpath('/personalinfo/profile[@profileID=W3Schools]'); :: Why learn the bad dialect of HTML when you get it free when tagging XML? Learn to tag with XML, program with XSL, then improve using Ruby on Rails, PHP... Later you may learn to fly using BETA. I liked the Borland C++ Builder with the possiblity to use inline ASM {statements, but I am an economist}. Overall principle, make it simple, as simple as possible but no simpler. as of 30. august 2007. It is when you combine the parsers with XPath (red line above), XPointer, XLink, XSL(T) the power of XML comes to its right.
__________________
Mini Network:: Financial information at your fingertips Learn object oriented programming where it started Last edited by kgun; 08-30-2007 at 02:18 PM. |
|
||||
|
If there is something called a web 2.0 site search engine / function, that is especially well suited for XML and its family of techologies and XML parsers. There should be no problem for a clever programmer that knows:to build a fairly advanced site search engine with Google suggest functionality. May be there are one already.
You find more information in my Web 2.0 static link collection of resources. Especially the links with anchor text:
Here is a link base example: "Example: Annotating a Specification Following is a non-normative set of declarations for an extended link that specializes in providing linkbase arcs: Code:
<!ELEMENT basesloaded ((startrsrc|linkbase|load)*)> <!ATTLIST basesloaded xlink:type (extended) #FIXED "extended"> <!ELEMENT startrsrc EMPTY> <!ATTLIST startrsrc xlink:type (locator) #FIXED "locator" xlink:href CDATA #REQUIRED xlink:label NMTOKEN #IMPLIED> <!ELEMENT linkbase EMPTY> <!ATTLIST linkbase xlink:type (locator) #FIXED "locator" xlink:href CDATA #REQUIRED xlink:label NMTOKEN #IMPLIED> <!ELEMENT load EMPTY> <!ATTLIST load xlink:type (arc) #FIXED "arc" xlink:arcrole CDATA #FIXED "http://www.w3.org/1999/xlink/properties/linkbase" xlink:actuate (onLoad |onRequest |other |none) #IMPLIED xlink:from NMTOKEN #IMPLIED xlink:to NMTOKEN #IMPLIED> Code:
<basesloaded> <startrsrc xlink:label="spec" xlink:href="spec.xml" /> <linkbase xlink:label="linkbase" xlink:href="linkbase.xml" /> <load xlink:from="spec" xlink:to="linkbase" actuate="onLoad" /> </basesloaded> Code:
<basesloaded> <startrsrc xlink:label="spec" xlink:href="spec.xml#string-range(//*,'Click here to reveal annotations.')" /> <linkbase xlink:label="linkbase" xlink:href="linkbase.xml" /> <load xlink:from="spec" xlink:to="linkbase" actuate="onRequest" /> </basesloaded> For those that only know HTML, there should be nothing revolutionary in the above markup. The difficult part is to learn the new markup languages and the important concept of XML name spaces that you use to bind different resources. Note that Internationalized Resource Identifiers (IRIs) is a generalization of an URI that is an generalization of an URL. So to sum up. To make a very efficient Web 2.0 XML powered site search engine with AJAX functionality (like Google suggest) the technology is there already. It is very important to think thoroughly when you structure your XML (CMS) site. Clever and smart use of tags, nodes, attributes, link bases and location sets etc. etc. may make your site search engine stand out. If you take the time to write one based on the above ideas, please cite this source and give me an example for free.
__________________
Mini Network:: Financial information at your fingertips Learn object oriented programming where it started Last edited by kgun; 09-02-2007 at 12:43 PM. |
|
|||
|
Hi All,
I wrote my own internal site search for the website i work on, derived from the project i worked on for my Msc. I used a ranking based on natural language and stem formation of words. (For example if someone writes reporting, reported or report these would all be converted to their stem form which is 'report'). I could then compare words easily when i then set a reference within a database table to each page on my site including reference to the key-phrases on each page. This method allows me to rank pages based on what and how i wanted them to rank and appear - and of course cause i built it it's free - woo-hoo! The only bummer is i havent written anything to automattically index new pages so i have to update the external page search params via mssql. If anyone wants to know anymore/access the source drop me a line. cheers mamola |
|
||||
|
Should like to see the code.
|
|
|||
|
Quote:
I am getting a new website this weekend, with JSP. This is xml at it`s most long developed api. Dynamic search responses are excellent using javascript, and xml files. |
|
||||
|
I am sure there is an exceedingly fast out there written in todays "assember", C++ where my preferred platform is the platform just above ASP.net on this site.
<digression> Why is Russian Academy of Sciences ranked just above Havard on that site? The reason is the following told by one of my professors (that I rely on) of mathematics.
Evolutin is not always continuos, but may evolve in steps, known from Genetic algorithms as mutation. This is not linear or continous reality. (look in the right column). Reccomended deeper search. Today I got an idea, Project for a student. Write a book with the following title: "From tagging, via XSL rule based programming, procedural and object oriented programming in C++ to distributed object programming and patterns in Beta". There are some treads in the C++ sub forum of my forum, that shows how compact, generic and flexible C++ is. This is definitely not W3 Schools stuff at present. P.S. Is Beta still ahead of its time, or are there some true pattern based languages out there. </digression> Note: Perl and PHP are scripring languages. PPH is interpreted. I do not know Perl, so that may be compiled machine code on the server. The version of Borland C++ that I have, could combine C++ code with inline assembler code. I once saw an example of a fractal programmed in C (that may be faster than C++ because of overhead in C++) and the same program written in assembler (you may use conditional compilation to solve probemes with various assemblers). The assembler version was 100 times faster. H. W. Stockman (Sept-Oct 1988 : "Fast fractals" Micro Cornucopia #43 page 22 - 29. <cite> This is one of our trick articles. The fractals are really just a sneaky way to get our attention. After all, how many of you would read an article about speeding up 386 software by a factor of 100? (One second thought ...) </cite> Fast computers or fast code or both? Example chess program written in Borland C++ Builder in 1995. Click on the link "sjakkprogram". mikmik, do you beat that program 10 of 100 times when the computer has 5 seconds to take the next move, you are definitely a better chess player than me. I am an unhappy ![]() Pm me the code / link if you find one in C++
__________________
Mini Network:: Financial information at your fingertips Learn object oriented programming where it started Last edited by kgun; 11-18-2007 at 12:16 PM. |
|
|||
|
"If you structure your site very well, you can make a very efficient site search engine in my view. It is not so very difficult to modify the code to your own needs. That site search function will retrive content by:
|
|
|||
|
Quote:
I used your given url it's not work properly . Please suggest me the another site search engine code. |
|
|||
|
Hi, I have simple javascript to search static pages in a website
Code:
var item = new Array();
/* Enter the information of your static pages in item array as each entry
following are the 2 sample entries I have made.
The entries should contain
item[c] = new Array("Page Name","path","Page Title","Many,Key,Words","Descriptive Comments")
*/
c=0; item[c]=new Array("index.htm","","info - Everything you ever wanted to know about Sikkim","homepage","info, Everything you ever wanted to know about Sikkim.");
c++; item[c]=new Array("maps.htm","","Maps","content,main,focus","maps of Sikkim.");
page="<html><head><title>Search Results</title><link href='somecss.css' rel=stylesheet type=text/css></head><body bgcolor='white'><span style='background-color: #000000'><p><b><center><font color='#FFFFFF' face='Tahoma' size='2'> Search Result </center></b></p></font></span><center><font face='verdana' size='2'><table border=0 cellspacing=10 width=80%>";
/* search is the function to search contents in website */
function search(frm)
{
if(frm.srchval.value=="" )
alert("please enter the search word");
else
{
win = window.open("","","width=400,height=340,left=200,top=80,scrollbars");
win.document.write(page);
txt = frm.srchval.value.split(" ");
fnd = new Array(); total=0;
for (i = 0; i < item.length; i++)
{
fnd[i] = 0; order = new Array(0, 4, 2, 3);
for (j = 0; j < order.length; j++)
for (k = 0; k < txt.length; k++)
if ((item[i][order[j]].indexOf(txt[k]) > -1 || item[i][order[j]].toLowerCase().indexOf(txt[k]) > -1 || item[i][order[j]].toUpperCase().indexOf(txt[k]) > -1) && txt[k] != "")
fnd[i] += (j+1);
}
for (i = 0; i < fnd.length; i++)
{
n = 0; w = -1;
for (j = 0;j < fnd.length; j++)
if (fnd[j] > n) { n = fnd[j]; w = j; };
if (w > -1) total += show(w, win, n);
fnd[w ] = 0;
}
win.document.write("</table><b><hr>Total found:</b> "+total+"<br></font></body></html>");
win.document.close();
}
}
function show(which,wind,num)
{
link = item[which][0] ;
line = "<tr><td><a href='" + link + "' target= '_blank' >" + "<b>" + item[which][2] + "</b></a> " +"<br>" ;
line += "<font face='verdana' size='1'>" +item[which][3] + "</font><br>"+"</td></tr>";
wind.document.write(line);
return 1;
}
Last edited by cpbhagtani; 12-18-2008 at 06:18 AM. |
|
|||
|
this provides some good help.
is there an opinion of hosted vs. owning code for site search? my preference is hosted. these seem like good options picosearch.com fusionbot.com swish-e.org/ xav.com/scripts/search/ |
|
|||
|
Last edited by mikmik; 04-11-2009 at 08:20 PM. Reason: sushil. just noticed. Good call |
|
|||
|
thats high praise - do you know if it works with dynamic sites?
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |