Manuel Fernandez Sanchez de la Blanca schreef:
> Hi, all.
>
> Is there some way of retrieving a snippet/summary of documents when 
> performing a search?
>
> Let me explain better.
>
> For example, when using 
> /api.php?action=query&list=search&srwhat=text&srsearch=cvs&format=xml  
> ,/the result  is
>
> /<api>
>    <query>
>       <search>
>          <p ns="0" title="Instalar CVS"/>
>          <p ns="0" title="Lista tareas"/>
>       </search>
>     </query>
> </api>/
>
> And I would like to get something as:
>
> /<api>
>    <query>
>       <search>
>          <p ns="0" title="Instalar CVS">...bla bla *cvs *bla bla 
> *instalar *... *cvs *bla bla...</p>
>          <p ns="0" title="Lista tareas"/>...blabla bla *lista tareas* 
> bla bla...</p>
>       </search>
>     </query>
> </api>/
>
> Is it possible?
You can't get snippets, but you can get the entire page content with

api.php?action=query&generator=search&gsrwhat=text&gsrsearch=cvs&prop=revisions&rvprop=content

Roan Kattouw (Catrope)

_______________________________________________
Mediawiki-api mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Reply via email to