Page 4 of 7 First ... 23456 ... Last
  • Jump to page:
    #46
  1. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Search engine with directorys


    Hi,

    As I see here I am not the only one who is develloping a search engine with php3 and mysql.
    What I need also is a support for Directorys. Hasl anyone alredy modeld a directory structure in an SQL database. If one of you did it would be great if he could provide me with some code and table structures to see how it is done. If anyone has another solution than an SQL database it would be also great if he/she tells me.

    My first Idear was to bild a table with contains the Information about every directory, that means the path, the name, the and a reference to the toplevel directory.
    The problem I am having is making that a uniqe structure, that means to be sure that a directory is only listed in one upper directory. I thougt about indexing it on the path, but that is difficult due to the restrictons of the length of indexed text, and also for performance causes.

    Any Ideas comments?

    Cornelius Keller
  2. #47
  3. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: Search engine with directorys


    Hi,

    Well here are two things I could think of. First, why dont you use the same two table structure with one table URL/../.../ID and second table ID/KEYWORD as described in teh article, but when some wants to go into particulat directory simply pass the directory name as a keyword and display the results as if they are in the directory. Second and I think much better solution is to assign each entry DIRECTORY_ID and SUBDIRECTORY_ID. For example, devshed.com would have a directory ID 'phorum' and subdirectory ID 'php' so if someone goes into directory phorum and subdirectory php you would simply
    <!-- Code -->
    <p><pre><font color=#008000><xmp>SELECT * where directoryID='phorum' and subdirectoryID='php';</xmp></font></pre><p>
    <!-- Code -->
    I hope this helps, unfortunately I do not have ready to go code to show you.
  4. #48
  5. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: How to break sentences into words (arrays)


    Why dont you use split()
    It will take in a string and use delimiter of your choice(space) to break it apart and than will return it as an array.
    For example:

    <!-- Code -->
    <p><pre><font color=#008000><xmp>
    $arr=split(" ", "Hello world!");
    echo("$arr[0] $arr[1]");
    </xmp></font></pre><p>
    <!-- Code -->

    Will display 'Hello world!' since $arr[0]="Hello" and $arr[1]="world!"

    Check the manual for more at www.php.net<br>

    Sincerely,<br>
    Oleg Timofeyev<br>
    www.2xdigi.com
  6. #49
  7. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: do the


    Could you send me the information also because I will like to restrict the number of results to 10 per page and do the next previous thing. Also does this mean that the database is searched each time, how does this affect performance.
  8. #50
  9. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: do the


    Oh, thank you brent, I'm grateful if you can send me the source. cu : )
  10. #51
  11. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: do the


    Thank you.
    my mail box : webmaster@sukyi.com
  12. #52
  13. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: How to break sentences into words (arrays)


    there's a PHP function that creates an array from a string called explode() ...
    <br>
    simple example :
    <br>
    say your form variable is called $sentence, then all you need to make an array of this variable is :
    <br>
    <br>
    $result = explode(" ",$sentence);
    <br>
    <br>
    so if a user entered something like "Hi there , I need you help", you can access the words by $result[0] .. $result[6]
    <br>
    hope that helps
    <br>
    <br>
    cya
  14. #53
  15. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    XML and PHP


    I am looking for information about XML documentation database, using PHP for the web.

    I will be grate someone can send me any url for that.

    Thanks.

    William
  16. #54
  17. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: Performance problem - and solution


    How would this solution hold up to 1.5 million records with about average of 120 words of text to index? I can see some words having 10,000 associated records. If a two word search was performed, and each word had 10,000 records it was in them client application would have to get the 2 lists of records from the database, sort them both, and then do a match operation on them. Not sure what the performance of this would be, but it doesn't seem to be that great. Any other ideas here?

    -Darren
  18. #55
  19. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: do the


    Oh yes !
    I went to your page and it is great !
    It is what I have always been looking for !
    Can you send me source too ?
    Thanks
    Lionel
  20. #56
  21. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: Performance problem - and solution


    I (just today) setup a slight variation on this idea. I imported the ODP data from thier RDF files and created a search feature using the ideas in this thread. It has 1,642,244 links with 763,353 word and there are 26,358,717 combinations linking the words to the links.

    It is a little slow when search on multiple words and when words have more than about 50,000 links assocated with them, but all in all I am very happy.
  22. #57
  23. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: Search engine with directorys


    Is there anyone who is going to create a PHP + MYSQL (or Others) Search Engine?

    I am considering of working on it...

    If there is any infomation please let me no.
  24. #58
  25. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: Search engine with directorys


    I have a search engine working with mysql and PHP
    bun i don't have a place to host it. Anyone interested?
  26. #59
  27. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    time ?


    hi,
    i have 20,000 records, and each has around 200 relevant words ...
    thant makes it 4,000,000 ( 4 million entries )
    how much time will a mysql/linux on a sun 400 mhz take to go thru it !
    ( if it is less than a second or two, then i can go ahead and use it in my project ..)
    ( just an approximation would do.)

    thanks,
    gaurav.
  28. #60
  29. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: Search engine with directorys


    We are trying to create a MySQL based Web Directory with Search Engine. Any pointers or suggestions on how to get MySQl to recursively query multiple tables (The table names cannot be hard coded as these are created on the fly.)
Page 4 of 7 First ... 23456 ... Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo