Menu

Delete an Index

Help
2012-06-01
2012-09-13
  • Madan Mohan

    Madan Mohan - 2012-06-01

    I have created an index and added an URL to crawl. After a successful crawl of
    30 pages I would like to add that URL to the exclusion list and then get the
    details of the indexes created. After getting the response (in an XML format)
    I would like to delete this index. I am doing an API request from another
    application (for all these activities).

    I am unable to delete the Index with the following request. Please help me ...

    http://localhost:8080/schema?cmd=deleteindex&index.name=index1&index.template
    =WEB_CRAWLER

    I got the below response. However, the index is not deleted.

    <response>

    <entry key="Status">OK</entry>

    <entry key="Info">Nothing to do</entry>

    </response>

     
  • Naveen A.N

    Naveen A.N - 2012-06-01

    Hello Madan,

    For deleting an index through the API you need another parameter named
    "index.delete.name".

    The "index.name" and the "index.delete.name"should be same.

    The parameter "index.template" is not needed for deleting an index it is used
    for creating an index.

    Example for deleting an index through API:

    http://localhost:8080/schema?cmd=deleteindex&index.name=index1&index.delete.n
    ame=index1

    The response will be show below

    <response>
        <entry key="Info">Index deleted: index1</entry>
        <entry key="Status">OK</entry>
        </response>
    
     
  • Madan Mohan

    Madan Mohan - 2012-06-01

    Thanks much Naveen. This works for me.

    May be the below URL has to be updated to help more people. Please correct me
    if my understanding is wrong. Thanks again.

    http://www.open-search-
    server.com/documentation/index.php/Schema_API

     
  • Naveen A.N

    Naveen A.N - 2012-06-01

    Thank you for your suggestion we will update it as soon as possible.

    -Naveen.A.N

     

Log in to post a comment.