Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6913929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:16:54+00:00 2026-05-27T09:16:54+00:00

I have an XML document collection, an inverted file indexer, and a command-line tool

  • 0

I have an XML document collection, an inverted file indexer, and a command-line tool for searching the index (or indices) produced by the indexer. Note that the latter returns a list of document IDs and various statistics about each document (rankings according to various functions, term hits, etc) rather than the actual document text. Both programs were written in straight C (by me).

  • The collection is not huge (~1GB).
  • The index is about 10-20% of the collection size.
  • This is not intended (and never will be) for public use (using it will require logging in).
  • It needs to run with client-side scripting totally disabled.

I’d like to whip up a simple web frontend that would allow me to query the index with a search term or terms and present the results appropriately, but it’s been a while since I touched any web stuff.

I want to see more or less the same info a query returns at the moment, but I’m not sure whether to write something (e.g. PHP, Ruby – alternative suggestions are welcome) that calls my command-line query program and processes the output, or whether re-implementing the query program would be more appropriate.

Are there any distinct advantages one has over the other? Security risks?
And can anyone recommend me a lightweight framework or library appropriate for any of this? (Like I said, haven’t touched web stuff in a while.)

Should I call the CLI query program? Why or why not?

(=/ I hope I’m not being too vague… do tell me if I should be asking this in a different manner.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:16:54+00:00Added an answer on May 27, 2026 at 9:16 am

    For something simple like this, I would use PHP and an Apache server. Why?

    It doesn’t require a web framework to interface between Apache; less complexity = less time for you to spend configuring. You could just install Apache and the php module, then drop in this file in your web-root, and point a html form to http://127.0.0.1/indexer.php with the textareas "name" and "author":

    <?php
    $required_terms = array("name", "author");
    
    foreach ($required_terms as $value) {
        if (!isset($_POST[$value])) {
            printf("The search term \"%s\" was missing", $value);
            exit;
        }
    }
    
    $terminal_command = sprintf("/usr/bin/indexer -n %s -a %s", $_POST["name"], $_POST["author"]);
    print exec($terminal_command);
    

    (Note this is just to show the simplicity, it needs validation of the post values received).

    Then this would run your application with the 2 values as arguments, then print whatever was sent to stdout by your application. No more hassle or things to setup. It would take you a couple of minutes to get up and running.

    So the main reason would be simple and fast to setup, for something internal and simple as this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an XML document that has a collection of objects. Each object has
I have the following collection in an XML document: <events> <event> <type>Downloaded</type> <result>Sucess</result> </event>
I have a List<Item> collection that I am trying to generate an xml file
I have implemented a csv file builder that takes in an xml document applies
I have a collection that I want to serialize to an xml document. The
I have an XML document with un-namespaced elements, and I want to use XSLT
I have an XML document: var xml:XML = new XML(<rootNode> <head> <meta name=template content=Default
I have an XML document something like ::: <?xml version=1.0 encoding=utf-8?> <?mso-application progid=Excel.Sheet?> <Workbook
I have an XML document that I'm trying to style via CSS. A relevant
I have an XML document looking similar to this: <items> <item cat=1 owner=14>bla</item> <item

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.