Moteur de recherche avec service d' indexation de microsoft ??

cs_zozio Messages postés 1 Date d'inscription mardi 29 janvier 2002 Statut Membre Dernière intervention 29 janvier 2002 - 29 janv. 2002 à 17:51
crack_xp Messages postés 91 Date d'inscription samedi 28 février 2004 Statut Membre Dernière intervention 25 janvier 2007 - 2 avril 2004 à 16:31
slt
nous sommes une association 1901 a but non lucratif et nous sommes
en train de faire un site web sur notre region.
nous voudrions integrer un moteur de recherche qui utiliserais
le service d'indexation de microsoft dans nos pages asp.
un champs de saisie pour la recherche serait disponible sur toutes
les pages du site et permettre de faire une recherche sur le site entier!
le resultat de la recherche nous donnerais le/les fichiers avec notre recherche
(fichier doc, txt, ppt, html, asp, ...) avec un lien vers ceux ci et un resumé
pour chaque fichier .

un grand merci au grand manitou qui poura nous aider

dvdrip@voila.fr

2 réponses

gedeef Messages postés 70 Date d'inscription dimanche 20 janvier 2002 Statut Membre Dernière intervention 16 février 2002
30 janv. 2002 à 13:45
tout est là :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnproasp2/html/integratingmicrosoftindexserver.asp

et plus particulièrement là :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnproasp2/html/howtoperformqueriesinasp.asp

La charte de ce forum demande de donner des explications plutôt que des urls mais la question est trop vaste pour cela.
Mais vous devriez pouvoir vous en sortir avec cette doc et les exemples fournis.
Bon courage.
0
crack_xp Messages postés 91 Date d'inscription samedi 28 février 2004 Statut Membre Dernière intervention 25 janvier 2007
2 avril 2004 à 16:31
<% Option Explicit %>
<html>
<head>
<title>SGG PRODUITS</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" src="sgg.js"></script>
<script language="javascript">
if (navigator.appName == "Netscape"){
document.write('<link rel="stylesheet" href="sggnet.css">');
}
else{
document.write('<link rel="stylesheet" href="sgg.css">');
}
//-->
</script>
<Script language="JavaScript">
<!-- hide from browsers
function post_form_prod(par_val){
document.form1.hidctl_prod.value=par_val;
document.form1.submit();
}
//-->
</script>
</head>



<!-- HAUT DU TABLEAU -->
<script language="javascript">tophaut();</script>
<!-- DEBUT DU TABLEAU -->
<table width="160" border="0" cellspacing="0" cellpadding="0">
----, </td>
,

----

,
Nouvelle recherche,

----

,
,

----

,
Rechercher un distributeur

</td>
<td colspan="2" valign="top">
Recherche,

----

,
,

----

,
<table width="500" border="0" cellspacing="0" cellpadding="0">
----, </td>
RESULTATS
DE VOTRE RECHERCHE >>

</td>
</tr>
<tr>
<td width="20"> </td>
<td>


<%

Dim strSearchPhrase
Dim objQuery
Dim objRecordSet
Dim objField
Dim ObjetUtil

' Pull the search phrase out of the request
strSearchPhrase = Request.form("searchPhrase")

' Check to see if we should return results or just the form
If strSearchPhrase <> "" and len (strSearchPhrase)>1 Then

' Create the query object

Set objQuery = Server.CreateObject("ixsso.Query")

objQuery.Query = strSearchPhrase
' objQuery.Query = SELECT ALL FROM SCOPE() WHERE size > 500000



Set ObjetUtil=Server.CreateObject("Ixsso.Util")
ObjetUtil.AddScopeToQuery objQuery,"d:\Clients\www.saint-gobain-glass.com\fichiers\fr", "Shallow"

' The name of the catalog we created in the index server GUI
objQuery.Catalog = "Web"

' Set the maximum number of records returned
objQuery.MaxRecords = 10

' Set the columns we are going to get back
objQuery.Columns = "DocTitle,vpath,filename,characterization"

' Set the sort by, which specifies which columns in the search results should be used for the sort
objQuery.SortBy = "rank[d]"

' Get the results
Set objRecordSet = objQuery.CreateRecordSet("nonsequential")

%>



<%
' Check to see if we got any results
If objRecordSet.EOF Then
%>
----

,
,

----

,
<%Response.Write "No results found, sorry for search phrase: " + strSearchPhrase %>
,

----

,
,

----

,

<%
else
Do While Not objRecordSet.EOF
%>
----

,
,

----

,
<%

Response.Write ""
If objRecordSet("DocTitle") <> "" Then
Response.Write objRecordSet("DocTitle")
Else
Response.Write objRecordSet("filename")
End If
Response.Write "
"

Response.Write ""

response.write("" & "Résumé : " & "" & Server.htmlEncode(objRecordSet("characterization"))&"...
")

objRecordSet.MoveNext

%>

,

----

,
,

----

,

<%
loop
end if

'Set the objects to nothing
Set objQuery = Nothing
Set objRecordSet = Nothing

%>

<% else %>
<%Response.Write "The Query contained only ignored words,try with another query.

,

----

,
,

----




<%end if%>



</td>
</tr>
<tr>
<td width="20"> </td>
<td> </td>
</tr>
</table>
</td>
</tr>
</table>
<form name="form1" action="d11.asp" method="post">



</form>

</html>

FINAL FANTASY X2
0
Rejoignez-nous