Efficient multidimensional fuzzy search for personal information management systems.bak

Uploaded on


  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads


Total Views
On Slideshare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. 1584 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 24, NO. 9, SEPTEMBER 2012 Efficient Multidimensional Fuzzy Search for Personal Information Management Systems ´Wei Wang, Christopher Peery, Amelie Marian, and Thu D. Nguyen, Member, IEEE Computer Society Abstract—With the explosion in the amount of semistructured data users access and store in personal information management systems, there is a critical need for powerful search tools to retrieve often very heterogeneous data in a simple and efficient way. Existing tools typically support some IR-style ranking on the textual part of the query, but only consider structure (e.g., file directory) and metadata (e.g., date, file type) as filtering conditions. We propose a novel multidimensional search approach that allows users to perform fuzzy searches for structure and metadata conditions in addition to keyword conditions. Our techniques individually score each dimension and integrate the three dimension scores into a meaningful unified score. We also design indexes and algorithms to efficiently identify the most relevant files that match multidimensional queries. We perform a thorough experimental evaluation of our approach and show that our relaxation and scoring framework for fuzzy query conditions in noncontent dimensions can significantly improve ranking accuracy. We also show that our query processing strategies perform and scale well, making our fuzzy search approach practical for every day usage. Index Terms—Information retrieval, multidimensional search, query processing, personal information management system. Ç1 INTRODUCTIONT HE amount of data stored in personal information management systems is rapidly increasing, followingthe relentless growth in capacity and dropping price of to the actual file content, structural location information (e.g., directory structure) and a potentially large amount of metadata information (e.g., access time, file type) are alsostorage. This explosion of information is driving a critical stored by the file system.need for powerful search tools to access often very hetero- In such a scenario, the user might want to ask the query:geneous data in a simple and efficient manner. Such tools http://ieeexploreprojects.blogspot.comshould provide both high-quality scoring mechanisms and ½filetype ¼ Ã :doc ANDefficient query processing capabilities. createdDate ¼ 03=21=2007 AND Numerous search tools have been developed to perform content ¼ 00 proposal draft00 ANDkeyword searches and locate personal information stored infile systems, such as the commercial tools Google Desktop structure ¼ =docs=W ayfinder=proposals:Search (GDS) [18] and Spotlight [26]. However, these tools Current tools would answer this query by returning allusually support some form of ranking for the textual part of files of type Ã :doc created on 03/21/2007 under thethe query—similar to what has been done in the Information directory /docs/Wayfinder/proposals (filtering conditions)Retrieval (IR) community—but only consider structure (e.g., that have content similar to “proposal draft” (rankingfile directory) and metadata (e.g., date, file type) as filtering expression), ranked based on how close the contentconditions. Recently, the research community has turned its matches “proposal draft” using some underlying textfocus on search over to Personal Information and Dataspaces scoring mechanism. Because all information other than[10], [14], [16], which consist of heterogeneous data collec- content are used only as filtering conditions, files that aretions. However, as is the case with commercial file system very relevant to the query, but which do not satisfy thesesearch tools, these works focus on IR-style keyword queries exact conditions would be ignored. For example, Ã :texand use other system information only to guide the keyword- documents created on 03/19/2007 and files in the directory /based search. archive/proposals/Wayfinder containing the terms “proposal Keyword-only searches are often insufficient, as illu- draft” would not be returned.strated by the following example:Example 1. Consider a user saving personal information in We argue that allowing flexible conditions on structure the file system of a personal computing device. In addition and metadata can significantly increase the quality and usefulness of search results in many search scenarios. For instance, in Example 1, the user might not remember the. The authors are with the Department of Computer Science, Rutgers exact creation date of the file of interest but remembers that University, Piscataway, NJ 08854. E-mail: {ww, peery, amelie, tdnguyen}@cs.rutgers.edu. it was created around 03/21/2007. Similarly, the user might ÃManuscript received 4 June 2010; revised 1 Feb. 2011; accepted 8 May 2011; be primarily interested in files of type :doc but might alsopublished online 7 June 2011. want to consider relevant files of different but related typesRecommended for acceptance by X. Zhou. (e.g., Ã :tex or Ã :txt). Finally, the user might misremember theFor information on obtaining reprints of this article, please send e-mail to:tkde@computer.org, and reference IEEECS Log Number TKDE-2010-06-0320. directory path under which the file was stored. In this case,Digital Object Identifier no. 10.1109/TKDE.2011.126. by using the date, size, and structure conditions not as 1041-4347/12/$31.00 ß 2012 IEEE Published by the IEEE Computer Society
  • 2. WANG ET AL.: EFFICIENT MULTIDIMENSIONAL FUZZY SEARCH FOR PERSONAL INFORMATION MANAGEMENT SYSTEMS 1585filtering conditions but as part of the ranking conditions of dynamic indexing structures and index construction algo-the query, we ensure that the best answers are returned as rithms for structural relaxations. In Section 5, we presentpart of the search result. our experimental results. Finally, we discuss related work The challenge is then to score answers by taking into in Section 6 and conclude in Section 7.account flexibility in the textual component together withflexibility in the structural and metadata components of thequery. Once a good scoring mechanism is chosen, efficient 2 UNIFIED MULTIDIMENSIONAL SCORINGalgorithms to identify the best query results, without consider- In this section, we present our unified framework foring all the data in the system, are also needed. assigning scores to files based on how closely they match In this paper, we propose a novel approach that allows query conditions within different query dimensions. Weusers to efficiently perform fuzzy searches across three distinguish three scoring dimensions: content for conditionsdifferent dimensions: content, metadata, and structure. We on the textual content of the files, metadata for conditions ondescribe individual IDF-based scoring approaches for each the system information related to the files, and structure fordimension and present a unified scoring framework for conditions on the directory path to access the file.multidimensional queries over personal information file We represent files and their associated metadata andsystems. We also present new data structures and index structure information as XML documents. We use a simpli-construction optimizations to make finding and scoringfuzzy matches efficient. fied version of XQuery to express metadata and structure While our work could be extended to a variety of conditions in addition to keyword-based content conditions.dataspace applications and queries, we focus on a file Any file that is relevant to one or more of the querysearch scenario in this paper. That is, we consider the conditions is then a potential answer for the query; it getsgranularity of the search results to be a single file in assigned a score for each dimension based on how close itthe personal information system. Of course, our techniques matches the corresponding query condition. Scores acrosscould be extended to a more flexible query model where multiple dimensions are unified into a single overall score forpieces of data within files (such as individual sections or ranking of answers.XML subtrees) could be returned as results. Our scoring strategy is based on an IDF-based interpreta- Our specific contributions1 include: tion of scores, as described below. For each query condition, we score files based on the least relaxed form of the condition . We propose IDF-based scoring mechanisms for that each file matches. Scoring along all dimensions is content, metadata, and structure, and a framework uniformly IDF-based which permits us to meaningfully to combine individual dimension scores into a unified aggregate multiple single-dimensional scores into a unified multidimensional score (Section 2). http://ieeexploreprojects.blogspot.com multidimensional score. . We adapt existing top-k query processing algorithms and propose optimizations to improve access to the 2.1 Scoring Content structure dimension index. Our optimizations take We use standard IR relaxation and scoring techniques for into account the top-k evaluation strategy to focus on content query conditions [30]. Specifically, we adopt the building only the parts of the index that are most TFÁIDF scoring formulas from Lucene [6], a state-of-the-art relevant to the query processing (Sections 3 and 4). keyword search tool. These formulas are as follows: . We evaluate our scoring framework experimentally and show that our approach has the potential to X scorec;tf ðt; fÞ Â scorec;idf ðtÞ scorec ðQ; fÞ ¼ ; ð1Þ significantly improve search accuracy over current t2Q NormLengthðfÞ filtering approaches (Sections 5.2 and 5.3). . We empirically demonstrate the effect of our optimi- pﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ zations on query processing time and show that our scorec;tf ðt; fÞ ¼ No: times t occurs in f ; ð2Þ optimizations drastically improve query efficiency   and result in good scalability Sections 5.4, 5.5, 5.6, 5.7, N and 5.8. scorec;idf ðtÞ ¼ 1 þ log ; ð3Þ 1 þ Nt There has been discussions in both the Database and IR where Q is the content query condition, f is the file beingcommunities on integrating technologies from the two fields scored, N is the total number of files, Nt is the number of files[1], [2], [7], [12] to combine content-only searches withstructure-based query results. Our techniques provide a step containing the term t, and NormLengthðfÞ is a normalizing 2in this direction as they integrate IR-style content scores with factor that is a function of f’s length. Note that relaxation isDB-style structure approximation scores. an integral part of the above formulas since they score all files The rest of the paper is organized as follows: In Section 2, that contain a subset of the terms in the query condition.we present our multidimensional scoring framework. In 2.2 Scoring MetadataSection 3, we discuss our choice of top-k query processing We introduce a hierarchical relaxation approach for each typealgorithm and present our novel static indexing structures of searchable metadata to support scoring. For example, Fig. 1and score evaluation techniques. Section 4 describes shows (a portion of) the relaxation levels for file types, 1. This work builds upon and significantly expands our work on scoring represented as a DAG.3 Each leaf represents a specific filemultidimensional data [24]. The top-k query processing indexes andalgorithms of Sections 3 and 4 are novel contributions as are the 2. See http://lucene.apache.org/java/2_4_0/scoring.html.experimental results of Sections 5.4, 5.5, 5.6, 5.7, and 5.8. 3. In our implementation, the DAG for file type is a tree.
  • 3. 1586 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 24, NO. 9, SEPTEMBER 2012 components when specifying structure query conditions in personal file systems. Assuming that structure query conditions are given as noncyclic paths (i.e., path queries), these relaxations are: . Edge generalization is used to relax a parent-child relationship to an ancestor-descendant relationship. For example, applying edge generalization to =a=b would result in =a==b. . Path extension is used to extend a path P such thatFig. 1. Fragment of the relaxation DAG for file type (extension) all files within the directory subtree rooted at P canmetadata. be considered as answers. For example, applying path extension to =a=b would result in =a=b==Ã.type (e.g., pdf files). Each internal node represents a more . Node inversion is used to permute nodes within ageneral file type that is the union of the types of its children path query P . To represent possible permutations, we(e.g., Media is the union of Video, Image, and Music) and thus is introduce the notion of node group as a path where thea relaxation of its descendants. A key characteristic of this placement of edges are fixed and (labeled) nodes mayhierarchical representation is containment; that is, the set of permute. Permutations can be applied to any adjacentfiles matching a node must be equal to or subsume the set of nodes or node groups except for the root and Ã nodes.files matching each of its children nodes. This ensures that the A permutation combines adjacent nodes, or nodescore of a file matching a more relaxed form of a query groups, into a single node group while preserving thecondition is always less than or equal to the score of a file relative order of edges in P . For example, applyingmatching a less relaxed form (see (4) below). node inversion on b and c from =a=b=c would result in We then say that a metadata condition matches a DAG node =a=ðb=cÞ, allowing for both the original query condi-if the node’s range of metadata values is equal to or subsumes tion as well as =a=c=b. The ðb=cÞ part of the relaxedthe query condition. For example, a file type query condition condition =a=ðb=cÞ is called a node group.specifying a file of type “Ã :cpp” would match the nodes . Node deletion is used to drop a node from a path.representing files of type “Code,” files of type “Document,” Node deletion can be applied to any path query oretc. A query condition on the creation date of a file would node group but cannot be used to delete the root nodematch different levels of time granularity, e.g., day, week or or the Ã node. To delete a node n in a path query P : http://ieeexploreprojects.blogspot.commonth. The nodes on the path from the deepest (mostrestrictive) matching node to the root of the DAG then - If n is a leaf node, n is dropped from P andrepresent all of the relaxations that we can score for that query P À n is extended with ==Ã. This is to ensurecondition. Similarly, each file matches all nodes in the DAG containment of the exact answers to P in the setthat is equal to or subsumes the file’s metadata value. of answers to P 0 , and monotonicity of scores. Finally, given a query Q containing a single metadata - If n is an internal node, n is dropped from P andcondition M, the metadata score of a file f with respect to Q parentðnÞ and childðnÞ are connected in P with ==.is computed as For example, deleting node c from a=b=c results in À N Á a=b==Ã because a=b==Ã is the most specific relaxed log nF ilesðcommonAncðnM ;nf ÞÞ scoreMeta ðQ; fÞ ¼ ; ð4Þ path query containing a=b=c that does not contain c. logðNÞ Similarly, deleting c from a=c=b==Ã results in a==b==Ã.where N is the total number of files, nM is the deepest node To delete a node n that is within a node group N in athat matches M, nf is the deepest DAG node that matches f, path query P , the following steps are required tocommonAncðx; yÞ returns the closest common ancestor of ensure answer containment and monotonicity ofnodes x and y in the relaxation hierarchy, and nF ilesðxÞ scores:returns the number of files that match node x. The score is - n and one of its adjacent edge in N are droppednormalized by logðNÞ so that a single perfect match would from N. Every edge within N becomes anhave the highest possible score of 1. ancestor-descendant edge. If n is the only node2.3 Scoring Structure left in N, N is replaced by that node in P .Most users use a hierarchical directory structure to organize - Within P the surrounding edges of N aretheir files. When searching for a particular file, a user may replaced by ancestor-descendant edges.often remember some of the components of the containing - If N is a leaf node group, the result query isdirectory path and their approximate ordering rather than the extended with ==Ã.exact path itself. Thus, allowing for some approximation on For example, deleting node a in x=ða=b==c=dÞ=y resultsstructure query conditions is desirable because it allows users in x==ðb==c==dÞ==y because the extension set ofto leverage their partial memory to help the search engine x=ða=b==c=dÞ=y contains 24 path queries, whichlocate the desired file. include x=a=b==c=d=y and x=b=c==d=a=y; after delet- Our structure scoring strategy extends prior work on ing node a, these two path queries become x==b==XML structural query relaxations [4], [5]. Specifically, the c=d=y and x=b=c==d==y. Therefore, x==ðb==c==dÞ==y isnode inversion relaxation introduced below is novel and the only most specific path query which contains theintroduced to handle possible misordering of pathname complete extension set and does not contain a.
  • 4. WANG ET AL.: EFFICIENT MULTIDIMENSIONAL FUZZY SEARCH FOR PERSONAL INFORMATION MANAGEMENT SYSTEMS 1587 the generation of these relaxations and efficient scoring of matching files is a major topic of Section 4. 2.4 Score Aggregation We aggregate the above single-dimensional scores into a unified multidimensional score to provide a unified ranking of files relevant to a multidimensional query. To do this, we ~ construct a query vector, VQ , having a value of 1 (exact ~ match) for each dimension and a file vector, VF , consisting of the single-dimensional scores of file F with respect to query Q. (Scores for the content dimension is normalized against the highest score for that query condition to get values in the range ½0; 1.) We then compute the projectionFig. 2. Structure relaxation DAG. Solid lines represent parent-child ~ ~ of VF onto VQ and the length of the resulting vector is usedrelationships. Dotted lines represent ancestor-descendant relationships, as the aggregated score of file F . In its current form, this iswith intermediate nodes removed for simplicity of presentation. IDFscores are shown at the top right corner of each DAG node. simply a linear combination of the component scores with equal weighting. The vector projection method, however, provides a framework for future exploration of more Note that the above relaxations can be applied to the complex aggregations.original query condition as well as relaxed versions of theoriginal condition. As proposed in [4], we use a DAG torepresent all possible structural relaxations of a path query 3 QUERY PROCESSINGcondition. In addition, the DAG structure is used for query We adapt an existing algorithm called the Thresholdprocessing (Section 3) as it allows us to incrementally access Algorithm (TA) [15] to drive query processing. TA uses aincreasingly relaxed answers, and for storing the resulting threshold condition to avoid evaluating all possible matchesscores for matching files. to a query, focusing instead on identifying the k best answers. An example DAG, along with example IDF scores (see (6) It takes as input several sorted lists, each containing thebelow), is given in Fig. 2 for the query condition /docs/ system’s objects (files in our scenario) sorted in descendingWayfinder/proposals. Only one exact match for the query order according to their relevance scores for a particularcondition exists so the score of 1 is associated with the DAG attribute (dimension in our scenario), and dynamicallyroot node. As we go down the DAG, the increasingly relaxed accesses the sorted lists until the threshold condition is met http://ieeexploreprojects.blogspot.comversions of the query condition match more and more files to find the k best answers.resulting in lower IDF scores. The most relaxed version of the Critically, TA relies on sorted and random accesses to retrievequery condition: //Ã matches all files and it has a score of 0. individual attribute scores. Sorted accesses, that is, accesses to We then say that a file matches a (possibly relaxed) query the sorted lists mentioned above, require the files to becondition if all structural relationships between the con- returned in descending order of their scores for a particulardition’s components are preserved in the file’s parent dimension. Random accesses require the computation of adirectory. For example, the file =a=b=c=f matches the score for a particular dimension for any given file. Randomcondition =a==c because the parent-child relationship accesses occur when TA chooses a file from a particular listbetween = and a and the ancestor-descendant relationship corresponding to some dimension, then needs the scores forbetween a and c are preserved in the directory =a=b=c. the file in all the other dimensions to compute its unified Finally, given a directory d and structure query Q, the score. To use TA in our scenario, our indexing structures andstructure score of a file f with respect to Q is computed as algorithms need to support both sorted and random access for each of the three dimensions. scoreStruct ðQ; fÞ ¼ max fscoreidf ðpÞjf 2 F ðd; pÞg; ð5Þ p2RðQÞ We now present these indexing structures and algorithms. ÀNÁ 3.1 Evaluating Content Scores log Np As mentioned in Section 2.1, we use existing TFÁIDF methods scoreidf ðpÞ ¼ ; Np ¼ jF ðd; pÞj; ð6Þ logðNÞ to score the content dimension. Random accesses are supported via standard inverted list implementations,where RðQÞ is the set of all possible relaxations of Q, F ðd; pÞ where, for each query term, we can easily look up the termis the set of all files that match a relaxation p of Q or frequency in the entire file system as well as in a particularp’s extension in d, and N is the total number of files in d. It is file. We support sorted accesses by keeping the inverted listsnecessary to identify the highest scoring relaxation p 2 in sorted order; that is, for the set of files that contain aRðQÞ as a directory d can match relaxations of Q that appear particular term, we keep the files in sorted order according toin different branches of the DAG and do not have a their TF scores, normalized by file size, for that term.4 We thencommon DAG ancestor. For example, DAG nodes ==a=b==Ã use the TA algorithm recursively to return files in sorted orderand ==ða=bÞ are relaxations of ==a=b. The path name =a=b=a according to their content scores for queries that contain morematches these two relaxations and their descendants but than one term.does not match their common DAG ancestor ==a=b. Note that the set of all possible relaxations of a query is 4. This gives the same sorted order as TFÁIDF since the IDF score of aquery dependent and so has to be generated at query time; term is the same for all files.
  • 5. 1588 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 24, NO. 9, SEPTEMBER 20123.2 Evaluating Metadata ScoresSorted access for a metadata condition is implemented usingthe appropriate relaxation DAG index. First, exact matchesare identified by identifying the deepest DAG node N thatmatches the given metadata condition (see Section 2.2). Onceall exact matches have been retrieved from N’s leafdescendants, approximate matches are produced by traver-sing up the DAG to consider more approximate matches.Each parent contains a larger range of values than its children,which ensures that the matches are returned in decreasingorder of metadata scores. Similar to the content dimension,we use the TA algorithm recursively to return files in sortedorder for queries that contain multiple metadata conditions. Random accesses for a metadata condition require Fig. 3. A directory tree and its structure index.locating in the appropriate DAG index the closest commonancestor of the deepest node that matches the condition and We extend our index to maintain the position that eachthe deepest node that matches the file’s metadata attribute component appears within each directory (Fig. 3). For(see Section 2.2). This is implemented as an efficient DAG efficiency, each directory is represented by an integertraversal algorithm. directory id, so that each entry in the index is a pair of3.3 Evaluating Structure Scores integers (DirID, position). This augmented index allows usThe structure score of a file for a query condition depends on to quickly check structural relationships between compo-how close the directory in which the file is stored matches the nents of a directory. For example, a parent-child relation-condition. All files within the same directory will therefore ship between two components n1 , (DirID1 ; P os1 ), and n2 ,have the same structure score. (DirID2 ; P os2 ), can be verified by checking that DirID1 ¼ To compute the structure score of a file f in a directory d DirID2 and P os2 ¼ P os1 þ 1. This is similar to some XMLthat matches the (exact or relaxed) structure condition P of labeling techniques [23]. When directory structure isa given query, we first have to identify all the directory updated, we synchronize the index by adding and/orpaths, including d, that match P . For the rest of the section, removing DirIDs from the inverted index for componentswe will use structure condition to refer to the original of affected directories. http://ieeexploreprojects.blogspot.com we extract from the query path: In the second phase,condition of a particular query and query path to refer to apossibly relaxed form of the original condition. We then 1) the set of node groups representing possible permuta-sum the number of files contained in all the directories tions of components, and 2) a sequence of logical conditionsmatching P to compute the structure score of these files for representing the left to right parent-child or ancestor-the query using (6). The score computation step itself is descendant relationship between each component-compo-straightforward; the complexity resides in the directory nent or component-node group pairs. For example, wematching step. Node inversions complicate matching query would extract the node group (Wayfinder//proposals) and thepaths with directories, as all possible permutations have to sequence (/docs, docs/(Wayfinder//proposals)) from the querybe considered. Specific techniques and their supporting path /docs/(Wayfinder//proposals). Then, to compute whetherindex structures need to be developed. a directory matches a query path, we would first identify Several techniques for XML query processing have parts of the directory that match the node groups. Finally,focused on path matching. Most notably, the PathStack we would attempt to find an ordering of components andalgorithm [9] iterates through possible matches using stacks, node groups that would match the generated sequence ofeach corresponding to a query path component in a fixed conditions. If we can find such an ordering, then theorder. To match a query path that allows permutations directory matches the query path; otherwise, it does not.(because of node inversion) for some of its components, we Given the above index, suppose that we want to computeneed to consider all possible permutations of these compo- whether the candidate directory /docs/proposals/final/Wayfin-nents (and their corresponding stacks) and a directory match der matches the query path /docs/(Wayfinder//proposals). Thefor a node group may start and end with any one of the node index would tell us that /, docs, Wayfinder, and proposalsgroup components, which makes it complicated to adapt the appear at positions 0, 1, 4, and 2, respectively. We would thenPathStack approach to our scenario. compute that the components proposals and Wayfinder We use a two-phase algorithm to identify all directories appearing at positions 4 and 2 represents a valid match forthat match a query path. First, we identify a set of candidate the node group (Wayfinder//proposals) of the query path; wedirectories using the observation that for a directory d to say that this node group component spans positions 2-4 formatch a query path P , it is necessary for all the components the candidate directory. We then compute that the ordering 0,in P to appear in d. For example, the directory /docs/ 1, (2-4) of /, docs, (Wayfinder//proposals) satisfies the left-to-proposals/final/Wayfinder is a potential match for the query right relationships extracted for the query path and thuspath /docs/(Wayfinder//proposals) since the directory contains concludes that the candidate directory is a valid match for theall three components docs, Wayfinder, and proposals. We query path. For a path query P with jP j components, ourimplement an inverted index mapping components to query matching algorithm has worst case I/O complexitydirectories to support this step (see Fig. 3). linear in the sum of sizes of the jP j inverted lists, and CPU
  • 6. WANG ET AL.: EFFICIENT MULTIDIMENSIONAL FUZZY SEARCH FOR PERSONAL INFORMATION MANAGEMENT SYSTEMS 1589time complexity linear in the length of the smallest of the jP j complete DAGs for query conditions =a; =a=b, =a=b=c; =a=b=inverted lists. The worst case space complexity does not c=d; =a=b=c=d=e. However, in many cases, enough queryexceed the maximum length of directory pathnames. Details matches will be found near the top of the DAG, and a largeof the algorithm and complexity analysis can be found in [29]. portion of the DAG will not need to be scored. Thus, we use Obviously, we also need to be able to efficiently find the a lazy evaluation approach to incrementally build the DAG,files residing in any given directory to support scoring. The expanding and scoring DAG nodes to produce additionalfile system itself supports this functionality. matches when needed in a greedy fashion [29]. The partial Given the above matching algorithm, we can then evaluation should nevertheless ensures that directories (andsupport TA in the structure dimension by dynamically therefore files) are returned in the order of their scores.building the DAG and populating its nodes with score For a simple top-k evaluation on the structure condition,information. (Building a static structural index is not a our lazy DAG building algorithm is applied and stopsrealistic option as this would entail enumerating all when k matches are identified. For complex queriespossible query conditions (paths) and all of their relaxa- involving multiple dimensions, the algorithm can be usedtions, a prohibitively expensive task.) A naive implementa- for sorted access to the structure condition. Randomtion of sorted access could then be a DAG traversal in accesses are more problematic as they may access any nodedecreasing order of structure scores. Similarly, random in the DAG. The DAG building algorithm can be used foraccess could be implemented as a DAG traversal to locate random access, but any random access may lead to thethe least relaxed query that a file matches. However, materialization and scoring of a large part of the DAG.5 Incomplete expansion and scoring of the DAG would be too the next sections, we will discuss techniques to optimizeexpensive. Thus, in the next section, we present optimiza- sorted and random access to the query relaxation DAG.tions to minimize the expansion and scoring of the DAG. 4.2 Improving Sorted Accesses Evaluating queries with structure conditions using the lazy4 OPTIMIZING QUERY PROCESSING IN THE DAG building algorithm can lead to significant query STRUCTURE DIMENSION evaluation times as it is common for multidimensional top-In this section, we present our dynamic indexes and k processing to access very relaxed structure matches, i.e.,algorithms for efficient processing of query conditions in matches to relaxed query paths that lay at the bottom of thethe structure dimension. This dimension brings the following DAG, to compute the top-k answers.challenges: An interesting observation is that not every possible relaxation leads to the discovery of new matches. For http://ieeexploreprojects.blogspot.com . The DAGs representing relaxations of structure example, in Fig. 2, the query paths /docs /Wayfinder/proposals, conditions [4], [24] are query dependent and so //docs/Wayfinder/proposals, and //docs//Wayfinder/proposals have to be built at query processing time. How- have exactly the same scores of 1, which means that no ever, since these DAGs grow exponentially with additional files were retrieved after relaxing /docs/Wayfinder/ query size, i.e., the number of components in the proposals to either //docs/Wayfinder/proposals or //docs//Way- query, efficient index building and traversal finder/proposals (6). By extension, if two DAG nodes share the techniques are critical issues. same score, then all the nodes in the paths between the two . The TA algorithm requires efficient sorted and DAG nodes must share the same score as well per the DAG random access to the single-dimension scores (Sec- definition. This is formalized in Theorem 1. tion 3). In particular, random accesses can be very Theorem 1. Given the structural scoreidf function defined in (6), expensive. We need efficient indexes and traversal if a query path P 0 is a relaxed version of another query path P , algorithms that support both types of access. and scoreidf ðP 0 Þ ¼ scoreidf ðP Þ in the structure DAG, any We propose the following techniques and algorithms to node P 00 on any path from P to P 0 has the same structure scoreaddress the above challenges. We incrementally build the as scoreidf ðP Þ, and F ðP 0 Þ ¼ F ðP 00 Þ ¼ F ðP Þ, where F ðP Þ isquery dependent DAG structures at query time, only the set of files matching query path P .materializing those DAG nodes necessary to answer a 0query (Section 4.1). To improve sorted access efficiency, we Proof (Sketch). If scoreidf ðP Þ ¼ scoreidf ðP Þ, then by defini-propose techniques to skip the scoring of unneeded DAG tion NP 0 ¼ NP (6). Because of the containment condition,nodes by taking advantage of the containment property of for any node P 00 on any path from P to P 0 , we havethe DAG (Section 4.2). We improve random accesses using a F ðP 0 Þ  F ðP 00 Þ  F ðP Þ and NP 0 ! NP 00 ! NP . Thus, NP 0 ¼novel algorithm that efficiently locates and evaluates only NP 00 ¼ NP and F ðP 0 Þ ¼ F ðP 00 Þ ¼ F ðP Þ, since otherwisethe parts of the DAG that match the file requested by each there exists at least one file which belongs to F ðP 0 Þ (or F ðP 00 Þ) but does not belongs to F ðP Þ and NP 0 6¼ NP (orrandom access (Section 4.3). NP 00 6¼ NP ), contradicting our assumption NP 0 ¼ NP (and4.1 Incremental Identification of Relaxed Matches NP 00 ¼ NP ). u tAs mentioned in Section 2.3, we represent all possiblerelaxations of a query condition and corresponding IDF Theorem 1 can be used to speed up sorted accessscores using a DAG structure. Scoring an entire query processing on the DAG by skipping the score evaluation ofrelaxation DAG can be expensive as they grow exponen- 5. We could modify the algorithm to only score the node that actuallytially with the size of the query condition. For example, matches the file of a random access. However, with our index, scoring isthere are 5, 21, 94, 427, and 1,946 nodes in the respective cheaper than computing whether a specific file matches a given node.
  • 7. 1590 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 24, NO. 9, SEPTEMBER 2012 that have a score 1, DAGJump marks as skippable all nodes that are on their path to the root node. It is worth noting that Algorithm 1’s depth-first traversal always follows the first child. We experimented several different heuristics for child selection (first child, middle child, last child, and random) and found no significant differences in performance. Our lazy DAG building algorithm incorporates DAGJump to reduce the processing time of sorted accesses. 4.3 Improving Random Accesses Top-k query processing requires random accesses to theFig. 4. An example execution of DAGJump. IDF scores are shown at thetop right corner of each DAG node. DAG. Using sorted access to emulate random access tends to be very inefficient as it is likely the top-k algorithm will access a file that is in a directory that only matches a veryDAG nodes that will not contribute to the answer, since the relaxed version of the structure condition, resulting in mostscore evaluation of DAG nodes can be expensive. We propose Algorithm 1, DAGJump, based on the above of the DAG being materialized and scored. While theidea. It includes two steps: 1) starting at a node corresponding DAGJump algorithm somewhat alleviates this problem by reducing the number of nodes that need to be scored,to a query path P , the algorithm performs a depth-first efficient random access remains a critical problem fortraversal and scoring of the DAG until it finds a parent-child 0 0 0 efficient top-k evaluations.pair, P and childðP Þ, where scoreidf ðchildðP ÞÞ<scoreidf ðP Þ; 00 We present the RandomDAG algorithm (Algorithm 2) toand 2) score each node P at the same depth (distance from 0 00 optimize random accesses over our structure DAG. The keythe root) as P ; if scoreidf ðP Þ ¼ scoreidf ðP Þ, then traverse all idea behind RandomDAG is to skip to a node P in the DAGpaths from P 00 back toward the root; on each path, the Ã that is either a close ancestor of the actual least relaxed nodetraversal will reach a previously scored node P , where Ã 6 00 P 0 that matches the random access file’s parent (containing)scoreidf ðP Þ ¼ scoreidf ðP Þ; all nodes on all paths from P to directory d or P 0 itself and only materialize and score the sub-P Ã can then be marked as skippable since they all must have DAG rooted at P as necessary to score P 0 . The intuition is thatthe same score as P 00 . we can identify P by comparing d and the original queryAlgorithm 1. DAGJump(srcNode) http://ieeexploreprojects.blogspot.com we compute the intersection between condition. In particular, 1. s ( getScore(srcNode) the query condition’s components and d. P is then computed 2. currentNode ( srcNode by dropping all components in the query condition that is not 3. loop in the intersection, replacing parent-child with ancestor- 4. targetDepth ( getDepth(currentNode) descendant relationships as necessary. The computed P is 5. childNode ( firstChild(currentNode) then guaranteed to be equal to or an ancestor of P 0 . As DAG 6. if getScore(childNode) 6¼ s or nodes are scored, the score together with matching direc- hasNoChildNodes(childNode) then tories are cached to speed up future random accesses. 7. exit loop Algorithm 2. RandomDAG(root, DAG, F ) 8. currentNode ( childNode 1. p ( getDirPath(F ) 9. for each n s.t. getDepth(n) ¼ targetDepth and 2. if p 2 DAGCache then getScore(n) ¼ s do 3. return getScoreFromCache(DAGCache,p)10. Evaluate bottom-up from n and identify ancestor 4. droppedComponents ( node set S s.t. getScore(m) ¼ s; 8m 2 S extractComponents(root) À extractComponents(p)11. for each m 2 S do 5. p0 ( root12. for each n0 on path p 2 getPaths(n; m) do 6. for each component 2 droppedComponents do13. setScore(n0 ; s) 7. p0 ( nodeDeletion(p0 , component)14. setSkippable(n0 ) 8. loop15. if notSkippable(m) then 9. n ( getNextNodeFromDAG(p0 )16. setSkippable(m) {getNextNodeFromDAG incrementally builds a An example execution of DAGJump for our query sub-DAG rooted at p0 and returns the next DAGcondition /docs/Wayfinder/proposals is given in Fig. 4. The node in decreasing order of scores.}two steps from Algorithm 1 are performed as follows: 10. fileMatches ( matchDirectory(getQuery(n))1) starting at the root with a score of 1, DAGJump performs 11. dirPaths ( getDirPaths(fileMatches)a depth-first traversal and scores the DAG nodes until it 12. addToCache(DAGCache, dirPaths, getScore(n))finds a node with a smaller score than 1 (//d//w//p); and 13. if p 2 dirPaths then2) DAGJump traverses each node at the same depth as //d// 14. return getScore(n)w/p (the parent node of //d//w//p); for the four such nodes 6. This condition is guaranteed to occur because of our DAG expansion As an example, for our query condition /docs/Wayfinder/algorithm [29]. proposals in Fig. 2, if the top-k algorithm wants to perform a
  • 8. WANG ET AL.: EFFICIENT MULTIDIMENSIONAL FUZZY SEARCH FOR PERSONAL INFORMATION MANAGEMENT SYSTEMS 1591 was 3.4 with the longest being 9. On average, each directory contains 11.6 subdirectories and files, with the largest—a folder containing e-mails—containing 1,013. The system extracted 347,448 unique stemmed content terms.8 File modification dates span 10 years. Seventy five percent of the files are smaller than 177 KB, and 95 percent of the files are smaller than 4.1 MB. 5.2 Impact of Flexible Multidimensional Search We begin by exploring the potential of our approach to improve scoring (and so ranking) accuracy using two example search scenarios. In each scenario, we initiallyFig. 5. An example execution of RandomDAG that returns the score of a construct a content-only query intended to retrieve a specificfile that is in the directory /archive/proposals/Planetp for the query target file and then expand this query along several othercondition /docs/Wayfinder/proposals. dimensions. For each query, we consider the ranking of the target file by our approach together with whether the targetrandom access to evaluate the structure score of a file that is file would be ranked at all by today’s typical filteringin the directory /archive/proposals/Planetp, RandomDAG will approaches on noncontent query conditions.first compute the close ancestor to the node that matches A representative sample of results is given in Table 1. In the=archive=proposals=P lanetp as the intersection between the first example, the target file is the novel “The Time Machine”query condition and the file directory, i.e., //proposals, and by H.G. Wells, located in the directory path /Personal/Ebooks/will jump to the sub-DAG rooted at this node. The file’s Novels/, and the set of query content terms in our initialdirectory does not match this query path, but does match its content-only query Q1 contains the two terms time andchild ==proposals==Ã with a structure score of 0.197. This is machine. While the query is quite reasonable, the terms areillustrated in Fig. 5 which shows the parts of the DAG from generic enough that they appear in many files, leading to aFig. 2 that would need to be accessed for a random access to ranking of 18 for the target file. Query Q2 augments Q1 withthe score of a file that is in the directory /archive/proposals/ the exact matching values for file type, modification date, andPlanetp. containing directory. This brings the rank of the target file to 1. The remaining queries explore what happens when we5 EXPERIMENTAL RESULTS provide an incorrect value for the noncontent dimensions. http://ieeexploreprojects.blogspot.com For example, in query Q10, a couple of correct but wronglyWe now experimentally evaluate the potential for our ordered components in the directory name still brings themultidimensional fuzzy search approach to improve rele- ranking up to 1. In contrast, if such directories were given asvance ranking. We also report on search performance filtering conditions, the target file would be consideredachievable using our indexing structures, scoring algorithms, irrelevant to the query and not ranked at all; queries whichand top-k adaptation. contain a “Ã ” next to our technique’s rank result represent5.1 Experimental Setup those in which the target file would not be considered as aExperimental environment. All experiments were per- relevant answer given today’s typical filtering approach.formed using a prototype system implemented in Java. We Results for the second example, which is a search for anuse the Berkeley DB [25] to persistently store all indexes and e-mail, are similar.Lucene to rank content. Experiments were run on a PC with This study also presents an opportunity for gauging thea 64-bit hyperthreaded 2.8 GHz Intel Xeon processor, 2 GB of potential impact of the node inversion relaxation. Specifi-memory, and a 10K RPM 70 GB SCSI disk, running the cally, queries Q23 and Q26 in the second example misorderLinux 2.6.16 kernel and Sun’s Java 1.4.2 JVM. Reported the structure conditions as /Java/Mail and /Java/Code,query processing times are averages of 40 runs, after respectively, compared to the real pathname /Personal/40 warm-up runs to avoid measurement JIT effects. All Mail/Code/Java. Node inversion allow these conditions tocaches (except for any Berkeley DB internal caches) are be relaxed to //(Java//Mail) and //(Java//Code), so that the target file is still ranked 1. Without node inversion, theseflushed at the beginning of each run. conditions cannot match the target until they both are Data set. As noted in [14], there is a lack of synthetic relaxed to ==Java=Ã , the matching relaxation with thedata sets and benchmarks to evaluate search over personal highest IDF score, using node deletion. This leads to ranksinformation management systems. Thus, we use a data set of 9 and 21 since files under other directories such as /that contains files and directories from the working Backup/CodeSnippet/Java and /workspace/BookExample/Javaenvironment of one of the authors. This data set contains now have the same structure scores as the target file.14.3 GB of data from 24,926 files organized in 2,338 di- In another example scenario not shown here, a user isrectories; 24 percent of the files are multimedia files (e.g., searching for the file wayfinder_cons.ppt stored in themusic and pictures), 17 percent document files (e.g., pdf, directory /Personal/publications/wayfinder/presentations. Thetext, and MS Office), 14 percent e-mail messages,7and query with content condition wayfinder, availability, paper,12 percent source code files. The average directory depth and structure condition /Personal/wayfinder/presentations 7. E-mail messages are stored in XML format in separate files. 8. Content was extracted from MP3 music files using their ID3 tags.
  • 9. 1592 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 24, NO. 9, SEPTEMBER 2012 TABLE 1 The Rank of Target Files Returned by a Set of Related Queries: The Queried Dimensions Include Content, Type (Metadata), Modification Date (Metadata), and Structure http://ieeexploreprojects.blogspot.comwould rank wayfinder_cons.ppt 1. However, if the structure cases where users are searching for files that theycondition is misordered as /Personal/presentations/wayfinder have not worked on for a while and so only vaguelyor /presentations/Personal/wayfinder, the rank of the target file remember the last modified times) around f’s actualwould fall to 17 and 28, respectively, without node inversion. last modified date. Each file type (extension) isWith node inversion, the conditions are relaxed to /Personal// randomly chosen from .txt or .pdf for a docu-(presentations/wayfinder) and /(presentations//Personal/wayfin- ment; otherwise, it is the correct file type.der), respectively, and the target file is still ranked 1. . Structure: A partial path p is formed by the correct ordering of two to four terms randomly chosen from5.3 Comparing with Existing Search Tools f’s parent directory pathname. The condition is thenWe compare the accuracy of our multidimensional ap- form by randomly choosing betweenproach with TopX [28], a related approach designed forXML search, GDS, and Lucene. - using p, Query sets. We consider a set of 40 synthetically generated - dropping one random term from p,search scenarios similar to those considered in the last - misordering a random pair of adjacent terms insection. Specifically, 20 e-mails and 20 XML documents (e.g., p, and - misspelling one random term in p.e-books) were randomly chosen to be search targets.Choosing XML documents (e-mails are stored in XML For GDS, each query contains the same content andformat) allows internal structure to be included in TopX structure terms as the multidimensional queries since GDSqueries. We then constructed 40 queries, one to search for indexes both content and terms from directory pathnames.each target file, for each search approach. GDS do not differentiate between the two types of terms in For our multidimensional approach, each query targeting the queries though, so each query is simply a set containinga file f contains content, metadata, and structure conditions terms of both types.as follows: For TopX, we choose content terms for each query as above. In addition, 1 to 2 XML tags that are parents of the . Content: Two to four terms chosen randomly from f’s content. chosen content terms are randomly chosen. Each query then . Metadata: A date (last modified) randomly chosen contains the tags, content terms, and accurate structural from a small range (Æ7 days to represent cases relationships between all components. where users are searching for files they recently For Lucene, we just use content terms for each query as worked on) or a large range (Æ3 months to represent above since Lucene only index textual content.
  • 10. WANG ET AL.: EFFICIENT MULTIDIMENSIONAL FUZZY SEARCH FOR PERSONAL INFORMATION MANAGEMENT SYSTEMS 1593 TABLE 2 The Mean Recall and Mean Reciprocal Rank of the Target File, and Average Precision for k ¼ 5; 10Fig. 6. The CDFs of ranks of the target files for multidimensional search(M), TopX, GDS, and Lucene. 5.4 Base Case Query Processing Performance We now turn to evaluating the search performance of our Note that this is not meant to be an “apple-to-apple” system. We first report query processing times for the basecomparison since the different tools index different infor- case where the system constructs and evaluates a structuralmation, and so the queries are different. Also, we introduce DAG sequentially without incorporating the DAGJumpinaccuracies in queries for our multidimensional approach (Section 4.2) and RandomDAG (Section 4.3) optimizationbut not the others. Thus, the study is only meant to assess algorithms. Note that the base case still includes thethe potential increase in search accuracy that comes with an implementation of the matchDirectory (Section 3.3) andadditional information of different types in the queries. incremental DAG building (Section 4.1) techniques. Fig. 6 plots the cumulative distribution function (CDF) of Query set. We expand the query set used in the lastranks of target files returned by the different search section for this study. Specifically, we add targets andapproaches. Table 2 presents the average recall, precision, queries for 40 additional search scenarios, 20 targetingand mean reciprocal rank (MRR) for each search technique additional (mostly non-XML) documents and 20 targetingfor k ¼ 5; 10. Recall and MRR are averages across the entire media files (music, etc.). Queries are constructed in thesets of 40 queries. Precision, however, is computed from a same manner as before. This large and diverse set of queriesrandomly selected subset of six queries for each technique. allow us to explore the performance of our system acrossThis is because computing precision is very time consum- the parameter space that should include most real-worlding, requiring the manual inspection of each top k files search scenarios. http://ieeexploreprojects.blogspot.com Choosing k. Query performance is a function of k, thereturned for each query and deciding whether the file is number of top ranked results that should be returned torelevant to the query. The recall metric is not the standard the user. We consider two factors in choosing a k value:IR recall because we do not have a relevance assessment for 1) the mean recall (as defined above) and MRR, and 2) theevery file against every query. Instead, recall is the likelihood that users would actually look through all kpercentage of time that the target file is returned as one of returned answers for the target file. We choose k ¼ 10 as athe top k answers. reasonable tradeoff between these two factors. For the set of Observe that GDS mostly outperforms content-only 80 queries, recall/MRR are 0.85/0.61 for k ¼ 10, which aresearch (Lucene) by using pathname terms. TopX mostly somewhat smaller than the 0.95/0.62 for k ¼ 20. Experienceoutperforms GDS and content-only search by using internal from web search, however, shows that users rarely lookstructure information. Finally, our approach performs the beyond the top 10 results. In fact, reporting search times forbest by leveraging external structure information and k ¼ 20 would have magnified the importance of ourmetadata. We plan to integrate internal structure into our optimizations without significantly increasing overall opti-method in the future to further improve search accuracy. mized performance results—see Section 5.8.Fig. 7. Breakdowns of query processing times for 15 queries for (a) the base case, and (b) DAGJump+RandomDAG case.
  • 11. 1594 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 24, NO. 9, SEPTEMBER 2012Fig. 8. The CDFs of query processing time. Results. Fig. 7a presents the query processing times,including breakdowns of the times required for top-k sortedand random accesses for each of the three search dimensions Fig. 9. Breakdown of query processing times for five representative queries. B, J, R, JR denote base, DAGJump, RandomDAG, and(Metadata, Content, and Structure), top-k aggregation DAGJump+RandomDAG cases, respectively.processing (Aggregate), and any remaining overhead (Over-head), for 15 representative queries (five from each of the RandomDAG optimizations. We observe that, together,three categories). We observe that query processing times can the two optimizations remove much of the “tail” of thebe quite large; for example, query Q10 took 125.57 seconds. In base case’s CDF; the maximum query processing time isfact, to view the distribution of processing times over all below 2 seconds in the DAGJump+RandomDAG curve.80 queries, Fig. 8 plots the CDF of the processing times, where This is particularly important because high variance ineach data point on the curve corresponds to the percent of response time is known to significantly degrade the user-queries (Y -axis) that finished within a given amount of time perceived usability of a system. Further, approximately(X-axis). The CDF shows that, for the base case, over 70 percent of the queries complete within 0.5 second,28 percent of the queries took longer than 2 seconds and while 95 percent of the queries complete within 1 second;9 percent took longer than 8 seconds to complete. these results show that the two optimizations have made We also observe that the processing times for the our system practical for everyday usage. This is especiallystructure dimension dominate the query processing times true considering that our prototype has not been http://ieeexploreprojects.blogspot.comfor the slowest queries—see the break down of processing optimized for any dimensions other than structure, and,times for Q2, Q3, Q5, Q7, Q9, Q10, Q11, and Q12 in Fig. 7. overall, has not been code optimized.For the entire set of 80 queries, processing times in thestructure dimension comprised at least 63 percent of the 5.6 Understanding the Impact of DAGJump andoverall query processing times for the 21 slowest queries RandomDAG(those with processing times ! 2.17 seconds). Interestingly, just using RandomDAG alone achieves much Thus, we conclude that it is necessary to optimize query of the benefits of using both optimizations together (Fig. 8).processing to make multidimensional search more practical In this section, we study the detail workings of the twofor everyday usage. More specifically, our results demon- optimizations for several queries to better understand thestrate the need to optimize query processing for the structure overlap and the differences between the two optimizations.dimension as it dominates the overall query processing time Fig. 9 shows break downs of query processing times forfor the worst performing queries. five queries (three from Fig. 7), where the structure processing times have further been broken down into three5.5 Query Processing Performance with categories: the node processing time required to check Optimizations whether a given directory is a member of the set ofFig. 7b gives the query processing times for the same directories matching a DAG node for random accesses15 queries shown in Fig. 7a, but after we have applied both (Node Proc), the time for scoring nodes—most of which isthe DAGJump and the RandomDAG algorithms. due to sorted accesses—(Score Eval), and other sources of We observe that these optimizations significantly reduce overheads in processing the structure dimension (Other).the query processing times for most of these queries. In We observe that the node processing times typicallyparticular, the query processing time of the slowest query, dominate, which explains the effectiveness of the Random-Q10, decreased from 125.57 to 1.96 seconds. Although not DAG optimization. In the absence of RandomDAG,shown here, all 80 queries now require at most 0.39 seconds DAGJump also significantly reduces the node processingof processing time for the structure dimension, and, on times because it skips many nodes that would otherwiseaverage, the percentage of processing time spent in the have to be processed during random accesses. DAGJump isstructure dimension is comparable to that spent in the not as efficient as RandomDAG, however, because it cannotmetadata dimension. skip as many nodes. With respect to sorted accesses, To view the overall effects of the optimizations on all DAGJump often skips nodes that are relatively cheap toqueries, Fig. 8 plots the CDF of the processing times for score (e.g., those with few matching directories). Thus, itall 80 queries for four cases: base case, use of DAGJump, only minimally reduces the cost of sorted accesses in mostuse of RandomDAG, and use of both the DAGJump and cases. There are cases such as Q11 and Q12, however,
  • 12. WANG ET AL.: EFFICIENT MULTIDIMENSIONAL FUZZY SEARCH FOR PERSONAL INFORMATION MANAGEMENT SYSTEMS 1595Fig. 10. The mean and median query times for queries targeting e-mailand documents plotted as a function of data set size. Fig. 11. The CDFs of query times for one (Original), two (Original+1), and three (Original+2) structural query conditions.where the cost of scoring nodes skipped by DAGJump issufficiently expensive so that using RandomDAG+DAG- Along a different dimension, we also measured queryJump is better than just using RandomDAG. performance for increasing k values. Results show that our To summarize, our DAGJump algorithm improves query approach scales very well with k. For example, theperformance when 1) there are many skippable nodes which 90th percentile processing time (i.e., the time within whichotherwise would have to be scored during the top-k sorted 90 percent of the queries completed) only increased fromaccesses, and 2) the total processing time spent on these nodes 0.87 seconds for k ¼ 10 to 0.9 seconds for k ¼ 20 tois significant. The RandomDAG algorithm improves query 1.13 seconds for k ¼ 50. Average and median queryperformance when 1) the top-k evaluation requests many processing times followed the same trend.random access, and 2) the total processing time that would Finally, Fig. 11 plots CDFs of query processing times whenhave been spent on nodes successfully skipped by Random- we extend each query studied in Section 5.5 to have twoDAG is significant. In general, RandomDAG is almost as (Original þ 1) and three structure conditions (Original þ 2).good as using both optimizations together but, there are cases Note that this means some queries contain three structurewhere using RandomDAG+DAGJump noticeably further conditions, each of which can contain four components,reduces query processing times. possibly with an embedded inaccuracy (e.g., swap of adjacent5.7 Storage Cost components). We expect that in practice, few structure query conditions would reach this size. Yet, observe that there is noWe report the cumulative size of http://ieeexploreprojects.blogspot.com our static indexes of performance degradation when adding one structure condi-Section 3 to show that our approach is practical with tion. When adding two conditions, 85 percent of the queriesrespect to both space (storage cost) and time (query still complete within 1 second. The tail of the CDF does stretchprocessing performance). In total, our indexes require246 MB of storage, which is less than 2 percent of the data but the worse query time is still just 6.75 seconds.set size (14.3 GB). This storage is dominated by the contentindex, which accounts for almost 92 percent of the 246 MB. 6 RELATED WORKThe indexes are so compact compared to the data set Several works have focused on the user perspective ofbecause of the large sound (music) and video (movie) files. personal information management [10], [21]. These worksAs future data sets will be increasingly media rich, we allow users to organize personal data semantically byexpect that our indexes will continue to require a relatively creating associations between files or data entities and theninsignificant amount of storage. leveraging these associations to enhance search.5.8 System Scalability Other works [14], [31] address information managementWe believe that our experimental data set is sufficiently by proposing generic data models for heterogeneous andlarge that our performance results apply directly to evolving information. These works are aimed at providingpersonal information management systems. Nevertheless, users with generic and flexible data models to accessing andwe briefly study the scalability of our system to assess its storing information beyond what is supported in traditionalpotential to handle very large personal data sets. Fig. 10, files system. Instead, we focus on querying information thatwhich plots average and median query times (for the same is already present in the file system. An interesting futureset of 80 queries discussed above) against data set size, direction would be to include entity associations in ourshows that query performance scales linearly with data set search and scoring framework.size but with a relatively flat slope (e.g., increase of only Other file system related projects have tried to enhance0.1 seconds in mean query processing time when the data the quality of search within file system by leveraging theset doubles in size). Further, analysis shows that the linear context in which information is accessed to find relatedgrowth is directly attributable to our unoptimized imple- information [13], [19] or by altering the model of the filementation of the top-k algorithm; score evaluation times system to a more object-orientated database system [8].remain relatively constant versus data set size. This result is These differ from ours in that they attempt to leveragequite promising because there are many known optimiza- additional semantic information to locate relevant filestions that we can apply to improve the performance and while our focus is in determining the most relevant piece ofscalability of the top-k algorithm. information based solely on a user-provided query.
  • 13. 1596 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 24, NO. 9, SEPTEMBER 2012 Recently there has been a surge in projects attempting to queries are decomposed into simple subexpressions and theimprove desktop search [18], [26]. These projects provide results of evaluating these subexpressions are combined orsearch capabilities over content and but use other query joined to get the final result. In [9], a PathStack is constructed todimensions, such as size, date, or types, as filtering condi- track partial and total answers to a query path by iteratingtions. Research has shown that desktop users tend to prefer through document nodes in their position order. Ourlocation-based search to a keyword-based search [22], which DepthMatch algorithm considers node permutations, whichobserves that users rely on the information such as are not easily supported by PathStack.directories, dates, and names when searching files. Anotherstudy [27] investigates user behavior when searching e-mails,files, and the web. Even if users know exactly what they are 7 CONCLUSIONSlooking for, they often navigate to their target in small steps, We presented a scoring framework for multidimensionalusing contextual information such as metadata information, queries over personal information management systems.instead of keyword-based search. These studies motivate the Specifically, we defined structure and metadata relaxationsneed for personal information management system search and proposed IDF-based scoring approaches for content,tools that use metadata and structure information. metadata, and structure query conditions. This uniformity of The INitiative for the Evaluation of XML retrieval (INEX) scoring allows individual dimension scores to be easily[20] promotes new scoring methods and retrieval techniquesfor XML data. INEX provides a collection of documents as a aggregated. We have also designed indexing structures andtestbed for various scoring methods in the same spirit as dynamic index construction and query processing optimiza-TREC was designed for keyword queries. While many tions to support efficient evaluation of multidimensionalmethods have been proposed in INEX, they focus on content queries.retrieval and typically use XML structure as a filtering We implemented and evaluated our scoring frameworkcondition. As a result, the INEX data sets and queries would and query processing techniques. Our evaluation show thatneed to be extended to account for structural heterogeneity. our multidimensional score aggregation technique pre-Therefore, they could not be used to validate our scoring serves the properties of individual dimension scores andmethods. As part of the INEX effort, XIRQL [17] presents a has the potential to significantly improve ranking accuracy.content-based XML retrieval query language based on a We also show that our indexes and optimizations areprobabilistic approach. While XIRQL allows for some necessary to make multidimensional searches efficientstructural vagueness, it only considers edge generalization, enough for practical everyday usage. Our optimized query http://ieeexploreprojects.blogspot.comas well as some semantic generalizations of the XML processing strategies exhibit good behavior across allelements. Similarly, JuruXML [11] provides a simple approx- dimensions, resulting in good overall query performanceimate structure matching by allowing users to specify path and scalability.expressions along with query keywords and modifies vectorspace scoring by incorporating a similarity measure based on ACKNOWLEDGMENTSthe difference in length, referred to as length normalization. XML structural query relaxations have been discussed in This work was supported in part by the US National[3], [4], [5]. Our work uses ideas from these previous works, Science Foundation (NSF) under grants number IIS-0844935such as the DAG indexing structure to represent all possible and CNS-0448070.structural relaxations [4] and the relaxed query containmentcondition [4], [5]. We introduce node inversion, an important REFERENCESnovel structure relaxation for personal information systems [1] S. Agrawal, S. Chaudhuri, G. Das, and A. Gionis, “Automated(as discussed in Section 5.6). This in turn led to the Ranking of Database Query Results,” Proc. First Biennial Conf.introduction of node groups, and necessitated algorithms Innovative Data Systems Research (CIDR ’03), 2003. ¨for matching node groups. We also designed DAGJump and [2] S. Amer-Yahia, P. Case, T. Rolleke, J. Shanmugasundaram, and G. Weikum, “Report on the DB/Ir Panel at SIGMOD 2005,” SIGMODRandomDAG to optimize query processing. Finally, we Record, vol. 34, no. 4, pp. 71-74, 2005.include metadata as an additional dimension that users can [3] S. Amer-Yahia, S. Cho, and D. Srivastava., “Tree Patternuse to improve search accuracy. Relaxation,” Proc. Int’l Conf. Extending Database Technology (EDBT), TopX [28] is another related effort in XML retrieval. 2002. [4] S. Amer-Yahia, N. Koudas, A. Marian, D. Srivastava, and D.While TopX considers both structure and content, it is Toman, “Structure and Content Scoring for XML,” Proc. Int’l Conf.different from our work in a number of ways. Specifically, Very Large Databases (VLDB), 2005.we consider external structure (directory pathnames) while [5] S. Amer-Yahia, L.V.S. Lakshmanan, and S. Pandit, “FleXPath: Flexible Structure and Full-Text Querying for XML,” Proc. ACMTopX considers internal structure (i.e., XML). Furthermore, SIGMOD Int’l Conf. Management of Data (SIGMOD), 2004.we use query relaxation to find and score approximate [6] Lucene, http://lucene.apache.org, 2012.matches, whereas TopX transitively expands all structural [7] R.A. Baeza-Yates and M.P. Consens, “The Continued Saga of DB-IR Integration,” Proc. Int’l Conf. Very Large Databases (VLDB),dependencies and counts the number of conditions 2004.matched by a file to score structure. We plan to extend [8] C.M. Bowman, C. Dharap, M. Baruah, B. Camargo, and S. Potti,our work to consider internal structure in the future but our “A File System for Information Management,” Proc. Int’l Conf.approach will still be based on query relaxation. Intelligent Information Management Systems (ISMM), 1994. [9] N. Bruno, N. Koudas, and D. Srivastava, “Holistic Twig Joins: Several works such as [9], [23] have studied efficient path Optimal Xml Pattern Matching,” Proc. ACM SIGMOD Int’l Conf.matching techniques for XML documents. In [23], path Management of Data (SIGMOD), 2002.
  • 14. WANG ET AL.: EFFICIENT MULTIDIMENSIONAL FUZZY SEARCH FOR PERSONAL INFORMATION MANAGEMENT SYSTEMS 1597[10] Y. Cai, X.L. Dong, A. Halevy, J.M. Liu, and J. Madhavan, Wei Wang received the BSE degree from “Personal Information Management with SEMEX,” Proc. ACM Zhejiang University in 1994, the ME degree SIGMOD Int’l Conf. Management of Data (SIGMOD), 2005. from the Chinese Academy of Sciences in 1997,[11] D. Carmel, Y.S. Maarek, M. Mandelbrod, Y. Mass, and A. Soffer, the MS degree from Rutgers in 2000, and the “Searching XML Documents via XML Fragments,” Proc. ACM Int’l PhD degree from Rutgers, the State University Conf. Research and Development in Information Retrieval (SIGIR), of New Jersey, in 2010. He was with Ask.com as 2003. a principle engineer and a senior development[12] S. Chaudhuri, R. Ramakrishnan, and G. Weikum, “Integrating DB manager of search technology. His research and IR Technologies: What Is the Sound of one Hand Clapping?,” interests include web search, personal informa- Proc. Conf. Innovative Data Systems Research (CIDR), 2005. tion management, and distributed systems.[13] J. Chen, H. Guo, W. Wu, and C. Xie, “Search Your Memory! - An Associative Memory Based Desktop Search System,” Proc. ACM SIGMOD Int’l Conf. Management of Data (SIGMOD), 2009. Christopher Peery received the PhD degree in[14] P.-J. Dittrich and M.A. Vaz.Salles, “iDM: A Unified and Versatile computer science from Rutgers, the State Data Model for Personal Dataspace Management,” Proc. Int’l Conf. University of New Jersey, in 2009. He is Very Large Databases (VLDB), 2006. currently employed as a software developer in[15] R. Fagin, A. Lotem, and M. Naor, “Optimal Aggregation the financial sector in New York City. His Algorithms for Middleware,” J. Computer and System Sciences, interests include personal information manage- vol. 66, pp. 614-656, 2003. ment, file systems, and distributed systems.[16] M. Franklin, A. Halevy, and D. Maier, “From Databases to Dataspaces: A New Abstraction for Information Management,” SIGMOD Record, vol. 34, no. 4, pp. 27-33, 2005.[17] N. Fuhr and K. Großjohann, “XIRQL: An XML Query Language Based on Information Retrieval Concepts,” ACM Trans. Informa- tion Systems, vol. 22, no. 2, pp. 313-356, 2004. ´ Ame lie Marian received the BS and MS[18] Google Desktop, http://desktop.google.com, 2012. ´ degrees from Universite Paris Dauphine, France[19] K.A. Gyllstrom, C. Soules, and A. Veitch, “Confluence: Enhancing in 1998 and 1999, respectively, and the PhD Contextual Desktop Search,” Proc. ACM Int’l Conf. Research and degree in computer science from Columbia Development in Information Retrieval (SIGIR), 2007. University in 2005. She has been an assistant[20] INEX, http://inex.is.informatik.uni-duisburg.de/, 2012. professor in the Computer Science Department[21] D.R. Karger, K. Bakshi, D. Huynh, D. Quan, and V. Sinha, at Rutgers, the State University of New Jersey, “Haystack: A General Purpose Information Management Tool for since September 2005. Her research interests End Users of Semistructured Data,” Proc. Conf. Innovative Data include top-k query processing, XML query Systems Research (CIDR), 2005. optimization, and XML and web data manage-[22] C.S. Khoo, B. Luyt, C. Ee, J. Osman, H.-H. Lim, and S. Yong, “How ment. She is the recipient of a US National Science Foundation (NSF) Users Organize Electronic Files on Their Workstations in the CAREER award (2009). Office Environment: A Preliminary Study of Personal Information Organization Behaviour,” Information Research, vol. 11, no. 2, p. 293, 2007. http://ieeexploreprojects.blogspot.com D. Nguyen received the BS degree from Thu[23] Q. Li and B. Moon, “Indexing and Querying XML Data for the University of California, Berkeley in 1986, the Regular Path Expressions,” Proc. Int’l Conf. Very Large Databases MS degree from MIT in 1988, and the PhD (VLDB), 2001. degree from the University of Washington in[24] C. Peery, W. Wang, A. Marian, and T.D. Nguyen, “Multi- 1999. He is currently an associate professor of Dimensional Search for Personal Information Management Sys- computer science at Rutgers, the State Uni- tems,” Proc. Int’l Conf. Extending Database Technology (EDBT), 2008. versity of New Jersey. His industry experience[25] Sleepycat Software, Berkeley DB, http://www.sleepycat.com/, include working as a director of web crawling for 2012. Ask.com and a member of technical staff for[26] Apple MAC OS X spotlight, http://www.apple.com/macosx/ AT&T Bell Labs. His current research interests features/spotlight. 2012. include information retrieval in file systems and the performance,[27] J. Teevan, C. Alvarado, M. Ackerman, and D. Karger, “The Perfect availability, and security of distributed systems. He is a member of the Search Engine Is Not Enough: A Study of Orienteering Behavior in IEEE Computer Society. Directed Search,” Proc. Conf. Human Factors in Computing Systems (SIGCHI), 2004.[28] M. Theobald, H. Bast, D. Majumdar, R. Schenkel, and G. Weikum, . For more information on this or any other computing topic, “TopX: Efficient and Versatile Top-k Query Processing for please visit our Digital Library at www.computer.org/publications/dlib. Semistructured Data,” VLDB J., vol. 17, no. 1, pp. 81-115, 2008.[29] W. Wang, C. Peery, A. Marian, and T.D. Nguyen, “Efficient Multi- Dimensional Query Processing in Personal Information Manage- ment Systems,” Technical Report DCS-TR-627, Dept. of Computer Science, Rutgers Univ., 2008.[30] I.H. Witten, A. Moffat, and T.C. Bell, Managing Gigabytes: Compressing and Indexing Documents and Images. Morgan Kauf- mann Publishers, Inc., 1999.[31] Z. Xu, M. Karlsson, C. Tang, and C. Karamanolis, “Towards a Semantic-Aware File Store,” Proc. Workshop Hot Topics in Operating Systems (HotOS), 2003.