iNeo

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            30 Posts :: 8 Stories :: 2 Comments :: 0 Trackbacks

          2006年8月3日 #

          我的tomcat工程建在:d:\eclipse\workspace\luc,索引文件是d:\eclipse\workspace\luc\public\index,建立索引的時候路徑為"luc\\public\\index",但在搜索的時候,我用
          searcher = new IndexSearcher(“luc\\public\\index”);
          報錯了,因為lucene在FSDirectory里將我的路徑給new File(file.getCanonicalPath());
          但奇怪的是file.getCanonicalPath()出來路徑不對呀
          錯誤是
          java.io.IOException: D:\eclipse\luc\public\index not a directory
          應該是d:\eclipse\workspace\luc\public\index 才對的
          郁悶很久了,現在還沒辦法解決!!!!!!!!!!!!!!!!!!!!!!!!!!
          posted @ 2006-08-03 09:12 只牽這只狗 閱讀(336) | 評論 (0)編輯 收藏

          主站蜘蛛池模板: 蓬溪县| 阿巴嘎旗| 湛江市| 邵阳县| 顺义区| 紫阳县| 阜新市| 招远市| 喀什市| 澳门| 莱州市| 称多县| 柳林县| 宝应县| 万全县| 呼伦贝尔市| 麻栗坡县| 温泉县| 化州市| 安庆市| 昌吉市| 商城县| 绍兴县| 台北市| 兴业县| 汝州市| 汪清县| 德保县| 临汾市| 广汉市| 平遥县| 城口县| 平陆县| 长乐市| 仁寿县| 呼图壁县| 富裕县| 鱼台县| 常德市| 刚察县| 桂林市|